]> git.gag.com Git - debian/tar/blob - debian/rules
fix merge errors, update man page to include new and changed commands
[debian/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" \
15                 ./configure --prefix=/usr --libexecdir=/usr/sbin $(CONFARGS)
16         touch configure-stamp
17
18 build: configure-stamp build-stamp
19 build-stamp:
20         dh_testdir
21
22         RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
23 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
24         (cd tests ; $(MAKE) clean)
25         $(MAKE) check
26 endif
27
28         touch build-stamp
29
30 clean:
31         dh_testdir
32         dh_testroot
33         rm -f build-stamp configure-stamp
34
35         [ ! -f Makefile ] || $(MAKE) distclean
36
37         dh_clean
38
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44
45         make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \
46                 libexecdir=`pwd`/debian/tar/usr/sbin 
47         install -m 755 debian/rmt.sh debian/tar/etc/rmt
48         mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
49
50 # Build architecture-independent files here.
51 binary-indep: build install
52
53 # Build architecture-dependent files here.
54 binary-arch: build install
55         dh_testdir
56         dh_testroot
57         dh_installdocs
58         mv -f debian/tar/usr/share/doc/tar/ChangeLog \
59                 debian/tar/usr/share/doc/tar/changelog
60         mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
61                 debian/tar/usr/share/doc/tar/changelog.1
62         dh_installexamples
63         dh_installmenu
64         dh_installcron
65         dh_installman debian/tar.1 debian/rmt.8
66         mv debian/tar/usr/share/man/man8/rmt.8 \
67            debian/tar/usr/share/man/man8/rmt-tar.8
68         dh_installinfo
69         rm -f debian/tar/usr/share/info/dir*
70         dh_installmime
71         dh_installchangelogs #CHANGELOGS#
72         dh_link
73         dh_strip
74         dh_compress
75         dh_fixperms
76         dh_installdeb
77         dh_shlibdeps
78         dh_gencontrol
79         dh_md5sums
80         dh_builddeb
81
82 binary: binary-indep binary-arch
83 .PHONY: build clean binary-indep binary-arch binary install configure