File: rules

package info (click to toggle)
alpine 2.11%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,876 kB
  • ctags: 26,747
  • sloc: ansic: 316,152; tcl: 26,277; sh: 11,228; makefile: 1,885; perl: 189; xml: 93; exp: 69; csh: 48; sed: 16
file content (62 lines) | stat: -rwxr-xr-x 2,328 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
#!/usr/bin/make -f
# debian/rules for alpine

# Used in get-orig-source, upstreams tarball.
SHASUM=fecc9ca5df03e0f368edec65cd61444325157b5635b5c92380cedf9c4ce8fbf6

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

override_dh_auto_configure:
	dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \
			     --build=$(DEB_BUILD_GNU_TYPE) \
			     --prefix=/usr \
			     --mandir=\$${prefix}/share/man \
			     --infodir=\$${prefix}/share/info \
			     --with-system-pinerc=/etc/pine.conf \
			     --with-system-fixed-pinerc=/etc/pinerc.fixed \
			     --with-passfile=.pine-passfile \
			     --with-smtp-msa=/usr/sbin/sendmail \
			     --with-debug-level=0 \
			     --without-tcl \
			     --with-krb5 \
			     --with-krb5-dir=/usr

override_dh_install:
	dh_install --list-missing
	# Rename pico to pico.alpine.
	# alpine-pico.install puts this in the alpine-pico package.
	mv debian/alpine-pico/usr/bin/pico debian/alpine-pico/usr/bin/pico.alpine

override_dh_installman:
	dh_installman
	mv debian/alpine-pico/usr/share/man/man1/pico.1 debian/alpine-pico/usr/share/man/man1/pico.alpine.1

override_dh_strip:
	dh_strip --dbg-package=alpine-dbg

override_dh_clean:
	dh_clean -Xinclude/config.h.in~ -Xweb/cgi/alpine/2.0/img/cbn/msglist.gif.bak

%:
	dh $@ --with autoreconf

# get-orig-source to drop dlls and exe files, fix license-problem-non-free-RFC-BCP78.
upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)(\+dfsg\d+)?.*$$/\1/p')
dfsg_version = $(upstream_version)+dfsg1
pkg = alpine

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=.
	# Check sha256sum against known good hash.
	sha256sum $(pkg)_$(upstream_version).orig.tar.xz | grep -q $(SHASUM)
	tar -xf $(pkg)_$(upstream_version).orig.tar.xz
	mv $(pkg)-$(upstream_version) $(pkg)-$(dfsg_version)
	## No obvious source code, not needed to build.
	cd $(pkg)-$(dfsg_version) ; rm -rf ldap/binaries/
	cd $(pkg)-$(dfsg_version) ; rm -f alpine/ldap32.dll
	## source-contains-unsafe-symlink
	cd $(pkg)-$(dfsg_version) ; rm -f web/detach web/bin/tclsh web/cgi/detach
	## http://wiki.debian.org/NonFreeIETFDocuments
	cd $(pkg)-$(dfsg_version) ; rm -rf imap/docs/draft/ imap/docs/rfc/
	XZ_OPT="-f6" tar -Jcf $(pkg)_$(dfsg_version).orig.tar.xz $(pkg)-$(dfsg_version)
	rm -rf $(pkg)-$(dfsg_version)