File: Makefile

package info (click to toggle)
sitescooper 3.1.2-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 3,000 kB
  • ctags: 662
  • sloc: perl: 8,677; makefile: 105
file content (114 lines) | stat: -rw-r--r-- 3,404 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Modified for Debian GNU/Linux
DESTDIR = 

PREFIX        = ${DESTDIR}/usr
ETC   = ${DESTDIR}/etc

INSTALL	= install

# raw prefix; for RPM etc. packaging, make install will be called with
# PREFIX=/tmp/..../usr. However all included paths should use the
# directory it's being installed into, i.e. /usr. That's what this is.
#
RAW_PREFIX	= ${PREFIX}

BINDIR	= ${PREFIX}/bin
LIBDIR	= ${PREFIX}/share/sitescooper

# grr. this is /usr/man on RedHat, /usr/share/man on Deb, /usr/share/man on
# Solaris. And no I am not going to write an autoconf script for sitescooper ;)
#
MANDIR	= ${PREFIX}/share/man

all: doc/sitescooper.html doc/rss-to-site.html doc/subs-to-site.html \
	true

doc/sitescooper.html:
	pod2html sitescooper.pl > doc/sitescooper.html
	pod2man sitescooper.pl > doc/sitescooper.man
	perldoc -t sitescooper.pl > doc/sitescooper.txt

doc/rss-to-site.html:
	pod2html rss-to-site.pl > doc/rss-to-site.html
	pod2man rss-to-site.pl > doc/rss-to-site.man
	perldoc -t rss-to-site.pl > doc/rss-to-site.txt

doc/subs-to-site.html:
	pod2html subs-to-site.pl > doc/subs-to-site.html
	pod2man subs-to-site.pl > doc/subs-to-site.man
	perldoc -t subs-to-site.pl > doc/subs-to-site.txt

sites.html:
	bash build/sites_to_html

site_perl/LWP.pm:
	perl build/getlwp

install: install-scripts install-sites


install-sites:
	-mkdir -p ${LIBDIR}
	${INSTALL} -d -m755 ${LIBDIR}
	cp -r site_samples ${LIBDIR}/site_samples
	cp -r profile_samples ${LIBDIR}/profile_samples


install-scripts:
	-mkdir -p ${BINDIR}
	-mkdir -p ${MANDIR}/man1
	-mkdir -p ${LIBDIR}
	-mkdir -p ${ETC}

	${INSTALL} -m755 sitescooper.pl ${BINDIR}/sitescooper
	${INSTALL} -m755 rss-to-site.pl ${BINDIR}/rss-to-site
	${INSTALL} -m755 subs-to-site.pl ${BINDIR}/subs-to-site

	[ ! -f ${ETC}/sitescooper.cf ] || mv ${ETC}/sitescooper.cf ${ETC}/sitescooper.cf.old
	${INSTALL} -m644 sitescooper.cf ${ETC}/sitescooper.cf
	echo "# [Next line added by Debian GNU/Linux installation]" >> ${ETC}/sitescooper.cf
	echo "SitescooperDir: /usr/share/sitescooper" >> ${ETC}/sitescooper.cf

	${INSTALL} -m644 doc/sitescooper.man ${MANDIR}/man1/sitescooper.1
	${INSTALL} -m644 doc/rss-to-site.man ${MANDIR}/man1/rss-to-site.1
	${INSTALL} -m644 doc/subs-to-site.man ${MANDIR}/man1/subs-to-site.1

	${INSTALL} -m644 default_templates.html ${LIBDIR}/default_templates.html

	-rm -rf ${LIBDIR}/lib
	mkdir ${LIBDIR}/lib
	cp -r  \
	      lib/Sitescooper \
	      lib/Algorithm \
	      lib/PDA \
	      lib/Exten \
	${LIBDIR}/lib
	# chmod 0755 ${LIBDIR}/lib/PDA/PilotInstall.pm

# 	-rm -rf ${LIBDIR}/site_perl
# 	mkdir ${LIBDIR}/site_perl
# 	cp -r site_perl/* ${LIBDIR}/site_perl


install-mods:
	-perlmoddir=`perl -e '		\
		use Config; $$_ = $$Config{installsitelib};	\
		s,'"${RAW_PREFIX}"','"${PREFIX}"',g; print;	\
		'`;			\
	cd site_perl ; tar cf - LWP.pm URI.pm LWP URI HTTP HTML WWW MIME Bundle | \
	      ( mkdir -p $$perlmoddir; cd $$perlmoddir ; tar xvf - )

clean:
	-rm -f doc/sitescooper.html doc/rss-to-site.html doc/subs-to-site.html
	-rm -f pod2html* sitescooper-modules.spec sitescooper.spec sitescooper-full.spec
	-rm -rf t/log getlwp.tmp
	-rm -rf automatic/out.* automatic/prc.* automatic/LOG
	-rm -rf automatic/DOC_LOG automatic/ISILO_LOG automatic/sites
	find . -name '.#*' -print | xargs rm -f

TEST_VERBOSE=0
TEST_FILES=t/*.t

test:
	perl -e 'use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;' $(TEST_FILES)