File: Makefile

package info (click to toggle)
prayer 1.3.5-dfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,576 kB
  • sloc: ansic: 43,161; makefile: 817; sh: 445; perl: 166
file content (83 lines) | stat: -rw-r--r-- 2,871 bytes parent folder | download | duplicates (5)
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
# $Cambridge: hermes/src/prayer/files/Makefile,v 1.10 2008/10/30 11:28:59 dpc22 Exp $
#
# Prayer - a Webmail Interface
#
# Copyright (c) University of Cambridge 2000 - 2002
# See the file NOTICE for conditions of use and distribution.

ifeq ($(strip $(RPM_BUILD)), true)
include ../Config-RPM
else
include ../Config
endif

all:	./etc/prayer.cf ./init.d/prayer

./etc/prayer.cf: ./etc/prayer.cf.SRC
	perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&;" < ./etc/prayer.cf.SRC > ./etc/prayer.cf

./init.d/prayer: ./init.d/prayer.SRC
	perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&; s&__PRAYER_CONFIG_FILE__&${PRAYER_CONFIG_FILE}&;" < ./init.d/prayer.SRC > ./init.d/prayer


ifeq ($(strip $(SSL_ENABLE)), true)
cert:
	rm -f ./certs/prayer.pem
	$(OPENSSL) req -new -x509 -days 365 -nodes \
		-config ./certs/prayer.cnf \
		-out    ./certs/prayer.pem \
		-keyout ./certs/prayer.pem
	$(OPENSSL) x509 -subject -dates -fingerprint -noout \
		-in ./certs/prayer.pem
else
cert:
	echo "SSL disabled"
endif

clean:
	rm -f  core *.o *.flc *~ \#*\#
	rm -f  etc/prayer.cf etc/*~ etc/\#*\#
	rm -f  init.d/prayer init.d/*~ init.d/\#*\#
	rm -rf sending
	rm -rf sockets/?    # Split spool
	find sockets    \! -path "sockets/CVS*"    \! -type d | xargs rm -f
	find tmp        \! -path "tmp/CVS*"        \! -type d | xargs rm -f
	find pid        \! -path "pid/CVS*"        \! -type d | xargs rm -f
	find ssl_scache \! -path "ssl_scache/CVS*" \! -type d | xargs rm -f
	find logs       \! -path "logs/CVS*"       \! -type d | xargs rm -f
	rm -f  certs/*~ certs/\#*\#

distclean:
	rm -f certs/prayer.pem

install-cert:
	if [ -f certs/prayer.pem ]; then \
	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) \
	-m $(PRIVATE_FILE) certs/prayer.pem ${BROOT}${PREFIX}/certs; \
	fi

install-config: etc/prayer.cf
	$(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
	etc/prayer.cf ${BROOT}${PRAYER_CONFIG_FILE}

install-aconfig:
	$(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
	etc/prayer-accountd.cf ${BROOT}${ACCOUNTD_CONFIG_FILE}

install-motd:
	$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
	etc/motd.html ${BROOT}/etc/prayer

install:
	${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${BROOT}${PREFIX}
	${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${BROOT}/etc/prayer

	tar -c --owner ${RO_USER} --group ${RO_GROUP} --mode "a-x+X" icons static | tar -C ${BROOT}${PREFIX} -x
	if [ ! -f $(BROOT)$(PRAYER_CONFIG_FILE) ]; then $(MAKE) install-config; fi
	if [ ! -f $(BROOT)$(ACCOUNTD_CONFIG_FILE) ]; then $(MAKE) install-aconfig; fi
	if [ ! -f $(BROOT)/etc/prayer/motd.html ]; then $(MAKE) install-motd; fi

redhat-install-init.d:
	install -D -o root -g root -m 755 \
		./init.d/prayer $(BROOT)/etc/rc.d/init.d/prayer
	#chkconfig prayer --level 2345 on