]> git.cworth.org Git - tar/blob - debian/rules
use xz when lzma is called for
[tar] / debian / rules
1 #!/usr/bin/make -f
2
3 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
4 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
5 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
6 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
7 endif
8
9 configure: configure-stamp
10 configure-stamp:
11         dh_testdir
12         cp -f /usr/share/misc/config.sub build-aux/config.sub
13         cp -f /usr/share/misc/config.guess build-aux/config.guess
14         RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" ./configure \
15                 --prefix=/usr \
16                 --libexecdir=/usr/sbin \
17                 --with-lzma=xz \
18                 $(CONFARGS) 
19         touch configure-stamp
20
21 build: build-stamp
22 build-stamp: configure-stamp
23         dh_testdir
24         RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
25
26 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
27 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
28         (cd tests ; $(MAKE) clean)
29         $(MAKE) check
30 endif
31 endif
32
33         perl debian/tarman > debian/tar.1
34         touch build-stamp
35
36 clean:
37         dh_testdir
38         dh_testroot
39         rm -f build-stamp configure-stamp debian/tar.1
40         [ ! -f Makefile ] || $(MAKE) distclean
41         dh_clean
42
43 install: build
44         dh_testdir
45         dh_testroot
46         dh_clean -k
47         dh_installdirs
48
49         make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
50                 libexecdir=`pwd`/debian/tar/usr/sbin 
51         install -m 755 debian/rmt.sh debian/tar/etc/rmt
52         mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
53
54 # Build architecture-independent files here.
55 binary-indep: build install
56
57 # Build architecture-dependent files here.
58 binary-arch: build install
59         dh_testdir
60         dh_testroot
61         dh_installdocs
62         mv -f debian/tar/usr/share/doc/tar/ChangeLog \
63                 debian/tar/usr/share/doc/tar/changelog
64         mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
65                 debian/tar/usr/share/doc/tar/changelog.1
66         dh_installexamples
67         dh_installmenu
68         dh_installcron
69         dh_installman debian/tar.1 debian/rmt.8
70         mv debian/tar/usr/share/man/man8/rmt.8 \
71            debian/tar/usr/share/man/man8/rmt-tar.8
72         dh_installinfo
73         rm -f debian/tar/usr/share/info/dir*
74         dh_installmime
75         dh_installchangelogs #CHANGELOGS#
76         dh_link
77         dh_strip
78         dh_compress
79         dh_fixperms
80         dh_installdeb
81         dh_shlibdeps
82         dh_gencontrol
83         dh_md5sums
84         dh_builddeb
85
86 binary: binary-indep binary-arch
87 .PHONY: build clean binary-indep binary-arch binary install configure