File: Makefile

package info (click to toggle)
printbill 4.1.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 660 kB
  • ctags: 151
  • sloc: perl: 5,488; ansic: 271; sh: 240; makefile: 108
file content (66 lines) | stat: -rw-r--r-- 3,245 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
DESTDIR =

include Config

progs:
	for i in $(BUILDSUBDIRS) ; do (cd $$i; make) || exit 1 ; done

clean:	
	for i in $(BUILDSUBDIRS) ; do (cd $$i; make clean) || exit 1 ; done

install: progs
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/bin
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/sbin
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man1
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man5
	mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man8
	mkdir -p $(DESTDIR)$(PMOD_HOME)/Printbill
	
	install -o $(OWNER) -g $(GROUP) -m 0755 $(BIN_PROGS) $(DESTDIR)$(TOPLEVEL_HOME)/bin
	install -o $(OWNER) -g $(GROUP) -m 0755 $(SBIN_PROGS) $(DESTDIR)$(TOPLEVEL_HOME)/sbin
	install -o $(OWNER) -g $(GROUP) -m 0644 $(PERL_MODS) $(DESTDIR)$(PMOD_HOME)/Printbill
	install -o $(OWNER) -g $(GROUP) -m 0644 $(MAN1_PAGES) $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man1
	install -o $(OWNER) -g $(GROUP) -m 0644 $(MAN5_PAGES) $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man5
	install -o $(OWNER) -g $(GROUP) -m 0644 $(MAN8_PAGES) $(DESTDIR)$(TOPLEVEL_HOME)/$(MAN)/man8

	if [ ${DO_CGI} = "y" ] ; then\
		mkdir -p $(DESTDIR)$(CGI_BIN) ; \
		install -o $(OWNER) -g $(GROUP) -m 0755 $(CGI_SCRIPTS) $(DESTDIR)$(CGI_BIN) ; \
	fi;

	install -d -m 0755 $(DESTDIR)/etc/printbill
	install -o $(OWNER) -g $(GROUP) -m 644 $(CONFIG_FILES) $(DESTDIR)/etc/printbill
	
	install -d -m 0755 -o $(OWNER) -g $(GROUP) $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill
	install -o $(OWNER) -g $(GROUP) -m 0644 docs/* $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill
	install -d -m 0755 -o $(OWNER) -g $(GROUP) $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill/examples
	install -o $(OWNER) -g $(GROUP) -m 0755 perl/buy perl/printbill_billme $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill/examples
	install -o $(OWNER) -g $(GROUP) -m 0644 examples/example_pq.html examples/printbillrc examples/printcap $(DESTDIR)$(TOPLEVEL_HOME)/share/doc/printbill/examples

	@echo
	@echo Installation completed. Assuming you didn\'t see any horrible error messages,
	@echo you should now configure your printbillrc and printcap files using 
	@echo "printbill_configure". Once this has been done you can run \"pqm --init\" to
	@echo initialise the databases. If you want to use the web interface it is suggested 
	@echo that you run \"pqm --updateprinters\" after you have configured your printcap 
	@echo file, so that they will be listed properly \(if you don\'t, printers will only 
	@echo be listed after something has been printed on them\). Also note that before 
	@echo anyone may print they must be added to the system and given some quota via the
	@echo commands \"pqm --add username\" and \"pqm --inc username --amount 10\" \(e.g. 
	@echo -e for \\04410 worth of quota\).
	@echo

install-init: install-init-script install-init-link

install-init-script:
	install -d -m 0755 -o $(OWNER) -g $(GROUP) $(DESTDIR)$(INITDIR)
	install -o $(OWNER) -g $(GROUP) -m 0755 $(INITSCRIPTDIR)/$(INITSCRIPT) $(DESTDIR)$(INITDIR)

# This one should be absolute - RedHat & Debian use the same

install-init-link:
	if [ ${INITSTYLE} = "sysv" ] ; then\
		install -d -m 0755 -o $(OWNER) -g $(GROUP) $(DESTDIR)$(SYSVLINKDIR) ; \
		ln -sf ../init.d/$(INITSCRIPT) $(DESTDIR)$(SYSVLINKDIR)/$(SYSVLINK) ; \
	fi;