1
|
1 #!/usr/bin/make -f
|
312
|
2 # Sample debian/rules that uses debhelper.
|
|
3 # GNU copyright 1997 to 1999 by Joey Hess.
|
1
|
4
|
312
|
5 # Uncomment this to turn on verbose mode.
|
1
|
6 #export DH_VERBOSE=1
|
|
7
|
312
|
8 # These are used for cross-compiling and for saving the configure script
|
|
9 # from having to guess our platform (since we know it already)
|
|
10 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
11 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
12 DEB_ARCH_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
1
|
13
|
312
|
14 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
|
15 CFLAGS += -g
|
1
|
16 endif
|
312
|
17 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
18 INSTALL_PROGRAM += -s
|
|
19 endif
|
|
20 ifeq ($(DEB_ARCH_GNU_TYPE), "alpha")
|
|
21 CFLAGS += -mieee
|
1
|
22 endif
|
|
23
|
312
|
24 config.status: configure
|
1
|
25 dh_testdir
|
312
|
26
|
|
27 -test -r /usr/share/misc/config.sub && \
|
|
28 cp -f /usr/share/misc/config.sub config.sub
|
|
29 -test -r /usr/share/misc/config.guess && \
|
|
30 cp -f /usr/share/misc/config.guess config.guess
|
|
31
|
|
32 ./configure \
|
|
33 --host=$(DEB_HOST_GNU_TYPE) \
|
|
34 --build=$(DEB_BUILD_GNU_TYPE) \
|
|
35 --prefix=/usr \
|
|
36 --mandir=\$${prefix}/share/man \
|
|
37 --infodir=\$${prefix}/share/info \
|
|
38 --enable-textport=yes
|
|
39
|
|
40 build: build-stamp
|
|
41 build-stamp: config.status
|
|
42 dh_testdir
|
1
|
43 $(MAKE)
|
312
|
44 touch build-stamp
|
1
|
45
|
312
|
46 clean: debian-clean
|
|
47 dh_clean
|
|
48
|
|
49 debian-clean:
|
1
|
50 dh_testdir
|
|
51 dh_testroot
|
312
|
52 -$(MAKE) distclean
|
|
53 -rm -f *-stamp
|
|
54 -rm -f config.sub config.guess
|
1
|
55
|
312
|
56 install: build
|
1
|
57 dh_testdir
|
|
58 dh_testroot
|
|
59 dh_clean -k
|
312
|
60 dh_installdirs
|
|
61
|
|
62 # Main install.
|
|
63 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
|
64
|
|
65 # Install icon
|
|
66 convert -geometry 32x32 $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.png $(CURDIR)/debian/tmp/usr/share/pixmaps/gftp.xpm
|
33
|
67
|
312
|
68 # Move all files in their corresponding package
|
|
69 dh_install --sourcedir=debian/tmp
|
33
|
70
|
312
|
71 # Install parse-netrc.pl
|
|
72 install -m 755 $(CURDIR)/docs/parse-netrc.pl $(CURDIR)/debian/gftp-common/usr/share/doc/gftp-common/examples
|
|
73
|
|
74 # Build architecture-independent files here.
|
|
75 binary-indep: build install
|
|
76 dh_testdir -i
|
|
77 dh_testroot -i
|
|
78 # dh_installdebconf
|
|
79 dh_installdocs -i
|
|
80 # dh_installexamples
|
|
81 # dh_installmenu
|
|
82 # dh_installlogrotate
|
|
83 # dh_installemacsen
|
|
84 # dh_installpam
|
|
85 # dh_installmime
|
|
86 # dh_installinit
|
|
87 # dh_installcron
|
|
88 # dh_installman
|
|
89 # dh_installinfo
|
|
90 dh_installchangelogs -i ChangeLog
|
|
91 dh_link -i
|
|
92 # dh_strip
|
|
93 dh_compress -i
|
|
94 dh_fixperms -i
|
|
95 # dh_makeshlibs
|
|
96 dh_installdeb -i
|
|
97 # dh_perl
|
|
98 # dh_shlibdeps
|
|
99 dh_gencontrol -i
|
|
100 dh_md5sums -i
|
|
101 dh_builddeb -i
|
|
102
|
1
|
103
|
312
|
104 # Build architecture-dependent files here.
|
|
105 binary-arch: build install
|
|
106 dh_testdir -a
|
|
107 dh_testroot -a
|
|
108
|
|
109 # Hack to remove files from the upstream tarball
|
|
110 -rm -f debian/dirs
|
|
111 -rm -f debian/docs
|
|
112 -rm -f debian/menu
|
|
113
|
|
114 dh_installdebconf -a
|
1
|
115 dh_installdocs -a
|
312
|
116 # dh_installexamples
|
|
117 dh_installmenu -a
|
|
118 # dh_installlogrotate
|
|
119 # dh_installemacsen
|
|
120 # dh_installpam
|
|
121 # dh_installmime
|
|
122 # dh_installinit
|
|
123 dh_installcron -a
|
|
124 dh_installman -a
|
|
125 dh_installinfo -a
|
33
|
126 dh_installchangelogs -a ChangeLog
|
312
|
127 dh_link -a
|
1
|
128 dh_strip -a
|
|
129 dh_compress -a
|
|
130 dh_fixperms -a
|
312
|
131 # dh_makeshlibs
|
1
|
132 dh_installdeb -a
|
312
|
133 # dh_perl
|
1
|
134 dh_shlibdeps -a
|
|
135 dh_gencontrol -a
|
|
136 dh_md5sums -a
|
|
137 dh_builddeb -a
|
312
|
138
|
1
|
139 binary: binary-indep binary-arch
|
|
140 .PHONY: build clean binary-indep binary-arch binary install
|