2 # Made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Christoph Lameter.
5 # $Id: rules,v 1.13 1999/03/23 20:26:39 che Exp $
8 # For the deb builder, you can run 'debian/rules cvs-build', which does all
9 # steps nescessary to produce a proper source tarball with the CVS/ removed.
10 # It builds in debian/cvs-build/apt-<VER>/, and places files in
11 # debian/cvs-build/. Optionally, you can run 'debian/rules cvs-mkul' to
12 # create ../upload-<VER>, with all the files needed to be uploaded placed
15 DEB_BUILD_PROG
:=debuild
16 APT_DEBVER
=$(shell dpkg-parsechangelog |sed
-n
-e
'/^Version:/s/^Version: //p')
17 APT_CONFVER
=$(shell sed
-n
-e
's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in
)
19 ifneq ($(APT_DEBVER
),$(APT_CONFVER
))
22 sed
-e
's/$(APT_CONFVER)/$(APT_DEBVER)/' $@
> $@.
$$$$;mv
$@.
$$$$ $@
27 # Uncomment this to turn on verbose mode.
30 # Find the libapt-pkg major version for use in other control files
31 export LIBAPT_MAJOR
:=$(shell egrep
'^MAJOR=' apt-pkg
/makefile |cut
-d
'=' -f
2)
34 # echo "libapt-pkg $(LIBAPT_MAJOR) libapt-pkg$(LIBAPT_MAJOR)" >> $@
35 # echo "libapt-pkg $(LIBAPT_MAJOR) apt $(APT_DEBVER)" >> $@
38 build-stamp
: configure
41 (cd build
; ..
/configure
)
42 # cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
43 # cd build && make all-hdr
46 # Add here commands to compile the package.
56 # Add here commands to clean up after the build process.
61 binary-indep
: libapt-pkg-doc
62 # Build architecture-independent files here.
63 libapt-pkg-doc
: build debian
/shlibs.local
69 # libapt-pkg-doc install
71 cp
-a build
/docs
/cache
* build
/docs
/design
* build
/docs
/dpkg-tech
* \
72 build
/docs
/files
* build
/docs
/method
* debian
/libapt-pkg-doc
/usr
/doc
/apt
/
73 cp
-a debian
/libapt-pkg-doc.dhelp debian
/libapt-pkg-doc
/usr
/doc
/libapt-pkg-doc
/.dhelp
75 dh_installexamples
-p
$@
79 dh_installmanpages
-p
$@
81 # dh_undocumented -p$@
82 dh_installchangelogs
-p
$@
86 # dh_suidregister -p$@
88 dh_gencontrol
-p
$@
-u
-Vlibapt-pkg
:major
=${LIBAPT_MAJOR}
93 # Build architecture-dependent files here.
95 binary-arch
: apt libapt-pkg-dev
96 apt
: build debian
/shlibs.local
104 cp build
/bin
/apt-
* debian
/tmp
/usr
/bin
/
106 # install the shared libs
107 find build
/bin
/ -type f
-name
"libapt-pkg.so.*" -exec cp
-a
"{}" debian
/tmp
/usr
/lib
/ \
;
108 find build
/bin
/ -type l
-name
"libapt-pkg.so.*" -exec cp
-a
"{}" debian
/tmp
/usr
/lib
/ \
;
110 cp build
/bin
/methods
/* debian
/tmp
/usr
/lib
/apt
/methods
/
112 cp build
/scripts
/dselect
/* debian
/tmp
/usr
/lib
/dpkg
/methods
/apt
/
113 # cp debian/sources.list debian/tmp/etc/apt/
115 # Copy the users guide
116 cp build
/docs
/guide.text debian
/tmp
/usr
/doc
/apt
/users-guide.txt
117 cp
-a build
/docs
/guide.html
/* debian
/tmp
/usr
/doc
/apt
/users-guide.html
/
119 # Copy the offline guide
120 cp build
/docs
/offline.text debian
/tmp
/usr
/doc
/apt
/offline.txt
121 cp
-a build
/docs
/offline.html
/* debian
/tmp
/usr
/doc
/apt
/offline.html
/
123 cp
-a debian
/dhelp debian
/tmp
/usr
/doc
/apt
/.dhelp
125 # head -n 500 ChangeLog > debian/ChangeLog
130 dh_installexamples
-papt build
/docs
/examples
/*
131 # dh_installmenu -papt
132 # dh_installinit -papt
133 # dh_installcron -papt
134 dh_installmanpages
-p
$@
136 # dh_undocumented -papt
137 dh_installchangelogs
-p
$@
141 # dh_suidregister -p$@
143 LD_LIBRARY_PATH
=`pwd`/debian
/tmp
/usr
/lib dh_shlibdeps
-papt
144 dh_gencontrol
-p
$@
-u
-Vlibapt-pkg
:major
=${LIBAPT_MAJOR}
145 dh_makeshlibs
-m
${LIBAPT_MAJOR} -Vlibapt-pkg
${LIBAPT_MAJOR} -papt
149 libapt-pkg-dev
: build debian
/shlibs.local
155 # libapt-pkg-dev install
157 ln
-s libapt-pkg.so.
${LIBAPT_MAJOR} debian
/libapt-pkg-dev
/usr
/lib
/libapt-pkg.so
158 cp build
/include/apt-pkg
/*.h debian
/libapt-pkg-dev
/usr
/include/apt-pkg
/
161 # dh_installmenu -papt
162 # dh_installinit -papt
163 # dh_installcron -papt
164 dh_installmanpages
-p
$@
166 dh_installchangelogs
-p
$@
170 # dh_suidregister -p$@
172 dh_gencontrol
-p
$@
-u
-Vlibapt-pkg
:major
=${LIBAPT_MAJOR}
177 @echo
>&2 'source and diff are obsolete - use dpkg-source -b'; false
184 # Update from CVS and then configure for build
185 super-l33ch
: l33ch Makefile.in
190 l33ch-stamp
: super-l33ch
194 -find
-name Makefile.in
-print0 | xargs
-0r
rm -f
195 find
-name ChangeLog | xargs
rm -f
198 binary
: binary-indep binary-arch
199 .PHONY
: build
clean binary-indep binary-arch binary debian
/shlibs.local
202 # Done by the uploader.
204 #edit debian/changelog
205 # configure.in has the version automatically updated now.
207 # debian/rules cvs-build
210 rm -rf debian
/cvs-build
215 tar c
--exclude CVS
--exclude debian
/cvs-build . |\
216 (mkdir
-p debian
/cvs-build
/apt-
$(APT_DEBVER
);cd debian
/cvs-build
/apt-
$(APT_DEBVER
);tar x
)
217 # The next line isn't needed, as debuild will make the .tar.gz for us.
218 # (cd debian/cvs-build;tar zcf apt_$(APT_DEBVER).tar.gz apt-$(APT_DEBVER))
219 (cd debian
/cvs-build
/apt-
$(APT_DEBVER
);$(DEB_BUILD_PROG
))
223 -mkdir
-p ..
/upload-
$(APT_DEBVER
)
224 cp
`find debian/cvs-build -maxdepth 1 -type f` ..
/upload-
$(APT_DEBVER
)