File: Makefile.am

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (190 lines) | stat: -rw-r--r-- 7,356 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# $Id: Makefile.am,v 1.87 2008/07/12 20:17:24 mrsam Exp $
#
# Copyright 1998 - 2007 Double Precision, Inc.  See COPYING for
# distribution information.

@SET_MAKE@

AUTOMAKE_OPTIONS=dist-bzip2

SUBDIRS=afx @DBSUBDIR@ numlib soxwrap md5 sha1 libhmac random128 unicode \
	rfc822 rfc1035 rfc2045 liblock maildir waitlib tcpd \
	threadlib makedat rootcerts imap maildrop cgi http11 ldapaddressbook \
	gpglib pcp webmail webadmin courier

DIST_SUBDIRS=afx gdbmobj bdbobj numlib soxwrap md5 sha1 libhmac random128 unicode \
	rfc822 rfc1035 rfc2045 liblock maildir waitlib tcpd \
	threadlib makedat rootcerts imap maildrop cgi http11 ldapaddressbook \
	gpglib pcp webmail webadmin courier

HTML2TXT=links -dump -no-numbering -no-references

INSTALL: courier/doc/install.html
	rm -f INSTALL
	$(HTML2TXT) courier/doc/install.html >INSTALL


NEWS: NEWS.html
	$(HTML2TXT) NEWS.html >NEWS

EXTRA_DIST=BENCHMARKS sysconftool ChangeLog.2001 \
	COPYING.GPL NEWS.html pgpkeys.txt config.rpath

DISTCLEANFILES=version configure.args
#
# install-perms creates permissions.dat, listing all files and directories,
# and their corresponding permissions.  This is used to build an RPM.
#

install-perms:
	@$(MAKE) install-perms-recursive
	@$(MAKE) install-perms-local

install-perms-recursive:
	@>permissions.dat
	@SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do ( cd $$f && $(MAKE) $(AM_MAKEFLAGS) install-perms ) ; cat /dev/null >>$$f/permissions.dat ; done
	@SUBDIRS="$(SUBDIRS)" ; for f in $$SUBDIRS ; do  cat $$f/permissions.dat >>permissions.dat ; done

install-perms-local:

install-data-local:
	cd courier && $(MAKE) -$(MAKEFLAGS) DESTDIR=$(DESTDIR) install-permissions
	@cat webmail/sqwebmail.msg
	@echo "Do not forget to run make install-configure"

install-recursive: install-check-umask

install-check-umask:
	@test `umask | sed 's/^0*//'` = 22 && exit 0; \
	test "$$INSTALL_IGNORE_UMASK" = 1 && exit 0; \
	echo "ERROR: your umask MUST be 022."; \
	echo "Change your umask to 022, then";\
	echo "rerun (g)make install." ; exit 1

all-recursive: all-make-check

all-make-check:
	$(MAKE) all-gmake-check FOO=BAR

all-gmake-check:
	@test "$(FOO)" = "BAR" && exit 0 ; echo "" ; \
		echo "ERROR: Something's wrong.  If you're using xBSD, you must use gmake" ; \
		echo "instead of make, as you were told by the INSTALL file (you did read the" ; \
		echo "INSTALL file, did you?)" ; echo "" ; exit 1

#
# For maintainer's use only
#

dist-hook:
	test -f $(srcdir)/rpm.release && cp $(srcdir)/rpm.release $(distdir) ; \
		exit 0
	$(MAKE) -$(MAKEFLAGS) courier.spec courier.lpspec
	cp courier.spec courier.lpspec $(distdir)

release: dist

distrelease:
	umask 022; $(MAKE) -s -$(MAKEFLAGS) distcheck
	$(MAKE) -$(MAKEFLAGS) rpm
	socksify cvs commit
	socksify cvs tag -d courier-latest
	socksify cvs tag courier-latest
	$(MAKE) -$(MAKEFLAGS)
	$(MAKE) -$(MAKEFLAGS)
	rm -f INSTALL courier.spec courier.lpspec
	$(MAKE) -$(MAKEFLAGS) INSTALL courier.spec courier.lpspec
	$(MAKE) -$(MAKEFLAGS) dist

rpm: rpm-build

rpm-build:
	$(MAKE) -$(MAKEFLAGS) bump.rpm.release
	$(MAKE) -$(MAKEFLAGS) dist
	$(MAKE) -$(MAKEFLAGS) dorpm

lpm: lpm-build

lpm-build:
	$(MAKE) -$(MAKEFLAGS) bump.rpm.release
	$(MAKE) -$(MAKEFLAGS) dist
	rm -rf lpm
	mkdir lpm
	lpbuild `test "@REPOSITORY@" == "" || echo --define "repository=1"` --srcbuild -o lpm @PACKAGE@-@VERSION@.tar.bz2


publish: publish-@REPOSITORY@

publish-dev:
	$(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=dev

publish-prod:
	$(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=prod

dopublish:
	lpbuild --resign lpm/*
	rm -rf lpmtmp
	mkdir lpmtmp
	ln lpm/* lpmtmp
	rm -f lpmtmp/*debuginfo*
	mv lpmtmp/*.src.lp repository-$(SUBDIR)/`lpm -q --distribution`/sources
	mv lpmtmp/*.lp repository-$(SUBDIR)/`lpm -q --distribution`/packages
	rm -rf lpmtmp
	ls -t repository-$(SUBDIR)/`lpm -q --distribution`/sources | tail -n +6 | xargs -r -n 1 lpm --erase repository-$(SUBDIR)
	lpm --sync repository-$(SUBDIR)
	rsync -a -v --delete-after repository-$(SUBDIR)/`lpm -q --distribution`/. headache:lpmtool.com/www/repositories/$(SUBDIR)/courier/`lpm -q --distribution`

dorpm:
	rm -rf rpm/BUILD/*
	rm -f rpm/RPMS/*/*
	rm -f rpm/SOURCES/*
	rm -f rpm/SPECS/*
	rm -f rpm/SRPMS/*
	unset MAKEFLAGS ; test ! -f $$HOME/.bashrc || . $$HOME/.bashrc; rpmbuild -ta --clean courier-@VERSION@.tar.bz2

bump.rpm.release: courier.spec courier.lpspec
	VERSION="x"; \
	test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
	NEXT_RELEASE=0; \
	test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
	RELEASE=`expr $$NEXT_RELEASE + 1`; \
	echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
	echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
	sed 's/^Release: .*/Release: '$$RELEASE'%{?dist}%{courier_release}/' \
		<courier.spec >courier.spec.new; \
	mv courier.spec.new courier.spec; \
	sed 's/^Release: .*/Release: '$$RELEASE'/' \
		<courier.lpspec >courier.lpspec.new; \
	mv courier.lpspec.new courier.lpspec


install-configure:
	@$(MAKE) -$(MAKEFLAGS) install-perms
	@SYSCONFTOOL@ `awk ' $$5 == "config" && $$1 ~ /\.dist$$/ { print $$1 }' <permissions.dat`

install-webadmin-password:
	@stty -echo ; echo -n "Password: " ; read P; stty echo ; echo "" ; echo $$P >@sysconfdir@/webadmin/password && chown @mailuser@ @sysconfdir@/webadmin/password && chgrp @mailgroup@ @sysconfdir@/webadmin/password && chmod 400 @sysconfdir@/webadmin/password

upload-beta:
	test -z "$(SFPASSWD)" && exit 1; exit 0
	rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
	socksify ssh grace.speakeasy.net echo @PACKAGE@-@VERSION@.tar.bz2 `ls -l @PACKAGE@-@VERSION@.tar.bz2 | awk ' { print $$5 } '` \>courier-mta.org/@PACKAGE@.beta
	rsync -aP --progress @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig frs.sourceforge.net:uploads/
	../sftools/release.pl mrsam $(SFPASSWD) courier courier-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` "" "" @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig


upload-dist:
	rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
	socksify cvs tag -F -r courier-latest \
               `echo courier-@VERSION@ | tr '.' '-'`
	socksify perl -e 'use Net::FTP; $$ftp=Net::FTP->new("upload.sourceforge.net.", Debug => 1, Passive => 1 ) || die; $$ftp->login("anonymous", "anonymous") || die; $$ftp->cwd("/incoming") && $$ftp->binary() && $$ftp->hash(1) && $$ftp->put("@PACKAGE@-@VERSION@.tar.bz2") && $$ftp->put("@PACKAGE@-@VERSION@.tar.bz2.sig") && exit 0; die;'
	ssh headache 'cd torrents.courier-mta.org/pub/@PACKAGE@ && rm -rf @PACKAGE@-@VERSION@ && mkdir @PACKAGE@-@VERSION@ && echo seeder_args=--max_upload_rate 50 >@PACKAGE@-@VERSION@.info && ls -t | sed 1,6d | xargs rm -rf '
	scp @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig headache:torrents.courier-mta.org/pub/@PACKAGE@/@PACKAGE@-@VERSION@

release-dist:
	test -z "$(SFPASSWD)" && exit 1; exit 0
	./changelog.pl >changelog.txt
	emacs releasenotes.txt
	test -f releasenotes.txt || exit 1
	socksify ../sftools/release.pl mrsam $(SFPASSWD) courier courier @VERSION@ releasenotes.txt changelog.txt @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
	socksify ssh grace.speakeasy.net rm -f courier-mta.org/courier.beta