File: Makefile.am

package info (click to toggle)
sysconftool 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 496 kB
  • sloc: sh: 508; perl: 356; makefile: 172
file content (203 lines) | stat: -rw-r--r-- 8,083 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
191
192
193
194
195
196
197
198
199
200
201
202
203
# Copyright 2000-2022 Double Precision, Inc.  See COPYING for
# distribution information.

AUTOMAKE_OPTIONS=dist-bzip2

datascriptdir=$(pkgdatadir)
datascript_SCRIPTS=sysconftool sysconftoolize.pl sysconftoolcheck
datascript_DATA=sysconftoolize.am

acdir=@ACDIR@
ac_DATA=sysconftool.m4

man_MANS=sysconftool.1 sysconftoolize.1 sysconftoolcheck.1 sysconftool.7
noinst_DATA=sysconftool.1.html sysconftoolcheck.1.html sysconftool.7.html

CLEANFILES=$(man_MANS) $(noinst_DATA)

EXTRA_DIST= \
  sysconftool.1.html.in sysconftool.7.html.in sysconftoolcheck.1.html.in \
  sysconftool.1.in sysconftool.7.in sysconftoolcheck.1.in \
  testsuite testsuite.txt sysconftool.spec sysconftoolize.am index.html \
  COPYING COPYING.GPL

# .deb packaging

EXTRA_DIST += \
	sysconftoolize.1 \
	courier-debuild \
	packaging/debian/changelog \
	packaging/debian/changelog.in \
	packaging/debian/control \
	packaging/debian/copyright \
	packaging/debian/rules \
	packaging/debian/source/format

if HAVE_SGML
sysconftool.1.html.in: sysconftool1.sgml libs/docbook/sgml2html
	libs/docbook/sgml2html sysconftool1.sgml sysconftool.1.html.in

sysconftool.1.stamp: sysconftool1.sgml libs/docbook/sgml2man
	libs/docbook/sgml2man sysconftool1.sgml sysconftool.1.in "--stringparam man.base.url.for.relative.links https://www.courier-mta.org/sysconftool/"
	mv sysconftool.1 sysconftool.1.in
	touch sysconftool.1.stamp

sysconftool.1.in: sysconftool.1.stamp
	touch sysconftool.1.in

sysconftoolize.1: sysconftool.1.stamp
	touch sysconftoolize.1

sysconftool.7.html.in: sysconftool7.sgml libs/docbook/sgml2html
	libs/docbook/sgml2html sysconftool7.sgml sysconftool.7.html.in

sysconftool.7.in: sysconftool7.sgml libs/docbook/sgml2man
	libs/docbook/sgml2man sysconftool7.sgml sysconftool.7.in "--stringparam man.base.url.for.relative.links https://www.courier-mta.org/sysconftool/"
	mv sysconftool.7 sysconftool.7.in

sysconftoolcheck.1.html.in: sysconftoolcheck.sgml libs/docbook/sgml2html
	libs/docbook/sgml2html sysconftoolcheck.sgml sysconftoolcheck.1.html.in

sysconftoolcheck.1.in: sysconftoolcheck.sgml libs/docbook/sgml2man
	libs/docbook/sgml2man sysconftoolcheck.sgml sysconftoolcheck.1.in "--stringparam man.base.url.for.relative.links https://www.courier-mta.org/sysconftool/"
	mv sysconftoolcheck.1 sysconftoolcheck.1.in
endif

sysconftool.1.html: sysconftool.1.html.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

sysconftool.7.html: sysconftool.7.html.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

sysconftoolcheck.1.html: sysconftoolcheck.1.html.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

sysconftool.1: sysconftool.1.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

sysconftool.7: sysconftool.7.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

sysconftoolcheck.1: sysconftoolcheck.1.in
	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status


check:
	@SHELL@ $(srcdir)/testsuite @PERL@ 2>&1 | cmp -s - $(srcdir)/testsuite.txt

install-exec-hook:
	$(mkinstalldirs) $(DESTDIR)$(bindir)
	rm -f $(DESTDIR)$(bindir)/sysconftoolize
	rm -f $(DESTDIR)$(bindir)/sysconftoolcheck
	$(LN_S) `realpath --relative-to $(bindir) -m $(datadir)/sysconftool/sysconftoolize.pl` $(DESTDIR)$(bindir)/sysconftoolize
	$(LN_S) `realpath --relative-to $(bindir) -m $(datadir)/sysconftool/sysconftoolcheck` $(DESTDIR)$(bindir)/sysconftoolcheck

uninstall-local:
	rm -f $(DESTDIR)$(bindir)/sysconftoolize $(DESTDIR)$(bindir)/sysconftoolcheck

DATE := $(shell date -R)
dist-hook:
	chmod +x $(distdir)/courier-debuild
	@PERL@ -p -i -e 's/\@DATE\@/'"$(DATE)"'/' $(distdir)/packaging/debian/changelog.in
	@PERL@ -p -i -e 's/\@DATE\@/'"$(DATE)"'/' $(distdir)/packaging/debian/changelog

rpm: rpm-build

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

dorpm:
	rm -rf rpm/BUILD/*
	rm -f rpm/RPMS/*/*
	rm -f rpm/SOURCES/*
	rm -f rpm/SPECS/*
	rm -f rpm/SRPMS/*
	rpmbuild -ta --clean \
		--define "_topdir `pwd`/rpm" \
		--define '_rpmdir %{_topdir}/RPMS' \
		--define '_srcrpmdir %{_topdir}/SRPMS' \
		--define '_sourcedir %{_topdir}/SOURCES' \
		--define '_specdir %{_topdir}/SPECS' \
		--define '_builddir %{_topdir}/BUILD' \
		--define '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
		--define '_tmppath %{_var}/tmp' \
		--define '__spec_prep_pre %{___build_pre}' \
		--target noarch sysconftool-@PACKAGE_VERSION@.tar.bz2
	$$HOME/bin/rpmrepos.sh

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

distrelease:
	$(MAKE) rpm
	rm -f sysconftool.spec packaging/debian/changelog
	$(MAKE) sysconftool.spec packaging/debian/changelog
	$(MAKE) dist
	$(MAKE) dorpm

packaging/debian/changelog: packaging/debian/changelog.in configure.ac
	CONFIG_FILES=packaging/debian/changelog $(srcdir)/config.status

deb: bump.deb.release
	$(MAKE) dist
	rm -rf @PACKAGE@-@VERSION@ deb
	tar xf @PACKAGE@-@VERSION@.tar.bz2
	cd @PACKAGE@-@VERSION@ && chmod +x ./courier-debuild && ./courier-debuild -us -uc && mv deb ../deb
	rm -rf @PACKAGE@-@VERSION@
	$$HOME/bin/debrepos.sh

deb-pbuild: bump.deb.release
	@test -z "$(PBUILD)" || exit 0; echo "Set PBUILD please"; exit 1
	. deb.release; \
	R="`echo $(PBUILD) | tr '.' '+'`"; \
	sed 's/^\([^ ][^ ]*\).*/\1 (@VERSION@-'$$RELEASE'+'$$R') devel; urgency=medium/' \
		<packaging/debian/changelog >packaging/debian/changelog.new; \
	mv packaging/debian/changelog.new packaging/debian/changelog
	$(MAKE) dist
	rm -rf @PACKAGE@-@VERSION@ deb/pbuild
	tar xf @PACKAGE@-@VERSION@.tar.bz2
	cd @PACKAGE@-@VERSION@ && chmod +x ./courier-debuild && ./courier-debuild -us -uc && mv deb ../deb/pbuild
	rm -rf @PACKAGE@-@VERSION@

bump.deb.release: packaging/debian/changelog
	VERSION="x"; \
	test -f $(srcdir)/deb.release && . $(srcdir)/deb.release; \
	NEXT_RELEASE=100; \
	test "$$VERSION" = "@PACKAGE_VERSION@" && NEXT_RELEASE="$$RELEASE"; \
	RELEASE=`expr $$NEXT_RELEASE + 1`; \
	echo "VERSION=@PACKAGE_VERSION@" >$(srcdir)/deb.release; \
	echo "RELEASE=$$RELEASE" >>$(srcdir)/deb.release; \
	. /etc/lsb-release; \
	R=`echo $$DISTRIB_RELEASE | tr '.' '+'`; \
	sed 's/^\([^ ][^ ]*\).*/\1 (@VERSION@-'$$RELEASE'+'$$R') devel; urgency=medium/' \
		<packaging/debian/changelog >packaging/debian/changelog.new; \
	mv packaging/debian/changelog.new packaging/debian/changelog

upload-beta:
	rm -f @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2; test -f @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig || exit 1
	~/src/sftools/release.pl mrsam courier @PACKAGE_NAME@-devel `echo @PACKAGE_VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2 @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig

upload-dist:
	rm -f @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2; test -f @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig || exit 1
	git tag -s @PACKAGE_NAME@/@PACKAGE_VERSION@/`date +%Y%m%d%H%M%S` -m 'Tag version @PACKAGE_VERSION@'
	socksify ~/src/sftools/release.pl mrsam courier @PACKAGE_NAME@ @PACKAGE_VERSION@ @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2 @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.bz2.sig

htmldoc: $(noinst_DATA) index.html
	rm -rf html
	mkdir html
	for f in $^; do d=`basename $$f`; tidy -i -q --tidy-mark no --doctype transitional --input-encoding utf8 --output-encoding utf8 -asxml <$$f >$$f.tmp ; xsltproc --nonet $$HOME/www/www.courier-mta.org/xsl/sysconftool.xsl $$f.tmp  >html/$$d; rm -f $$f.tmp; done
	mv html/* $$HOME/www/www.courier-mta.org/sysconftool
	rm -rf html

.PHONY: rpm deb