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.10 1999/03/18 03:30:31 doogie Exp $
7 DEB_BUILD_PROG
:=debuild
8 APT_DEBVER
=$(shell dpkg-parsechangelog |sed
-n
-e
'/^Version:/s/^Version: //p')
9 APT_CONFVER
=$(shell sed
-n
-e
's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in
)
11 ifneq ($(APT_DEBVER
),$(APT_CONFVER
))
14 sed
-e
's/$(APT_CONFVER)/$(APT_DEBVER)/' $@
> $@.
$$$$;mv
$@.
$$$$ $@
19 # Uncomment this to turn on verbose mode.
22 # Find the libapt-pkg major version for use in other control files
23 export LIBAPT_MAJOR
=`egrep '^MAJOR=' apt-pkg/makefile |cut -d '=' -f 2`
26 build-stamp
: configure
29 (cd build
; ..
/configure
)
30 # cd build && CXXFLAGS="-g -Wall -D_POSIX_C_SOURCE=199309" ../configure --disable-nls --disable-static --prefix=/usr
31 # cd build && make all-hdr
34 # Add here commands to compile the package.
44 # Add here commands to clean up after the build process.
49 # Build architecture-independent files here.
56 # libapt-pkg-doc install
59 cp
-a build
/docs
/cache
* build
/docs
/design
* build
/docs
/dpkg-tech
* \
60 build
/docs
/files
* build
/docs
/method
* debian
/libapt-pkg-doc
/usr
/doc
/apt
/
61 cp
-a debian
/libapt-pkg-doc.dhelp debian
/libapt-pkg-doc
/usr
/doc
/libapt-pkg-doc
/.dhelp
70 dh_installchangelogs
-i
76 dh_gencontrol
-i
-u
-Vlibapt-pkg
:major
=${LIBAPT_MAJOR}
81 # Build architecture-dependent files here.
91 cp build
/bin
/apt-
* debian
/tmp
/usr
/bin
/
93 # install the shared libs
94 find build
/bin
/ -type f
-name
"libapt-pkg.so.*" -exec cp
-a
"{}" debian
/tmp
/usr
/lib
/ \
;
95 find build
/bin
/ -type l
-name
"libapt-pkg.so.*" -exec cp
-a
"{}" debian
/tmp
/usr
/lib
/ \
;
97 cp build
/bin
/methods
/* debian
/tmp
/usr
/lib
/apt
/methods
/
99 cp build
/scripts
/dselect
/* debian
/tmp
/usr
/lib
/dpkg
/methods
/apt
/
100 # cp debian/sources.list debian/tmp/etc/apt/
102 # Copy the users guide
103 cp build
/docs
/guide.text debian
/tmp
/usr
/doc
/apt
/users-guide.txt
104 cp
-a build
/docs
/guide.html
/* debian
/tmp
/usr
/doc
/apt
/users-guide.html
/
106 # Copy the offline guide
107 cp build
/docs
/offline.text debian
/tmp
/usr
/doc
/apt
/offline.txt
108 cp
-a build
/docs
/offline.html
/* debian
/tmp
/usr
/doc
/apt
/offline.html
/
110 cp
-a debian
/dhelp debian
/tmp
/usr
/doc
/apt
/.dhelp
112 # head -n 500 ChangeLog > debian/ChangeLog
115 # libapt-pkg-dev install
117 ln
-s libapt-pkg.so.
${LIBAPT_MAJOR} debian
/libapt-pkg-dev
/usr
/lib
/libapt-pkg.so
118 cp build
/include/apt-pkg
/*.h debian
/libapt-pkg-dev
/usr
/include/apt-pkg
/
122 dh_installexamples
-papt build
/docs
/examples
/*
123 # dh_installmenu -papt
124 # dh_installinit -papt
125 # dh_installcron -papt
126 dh_installmanpages
-a
128 # dh_undocumented -papt
129 dh_installchangelogs
-a
135 LD_LIBRARY_PATH
=`pwd`/debian
/tmp
/usr
/lib dh_shlibdeps
-papt
136 dh_gencontrol
-a
-u-Vlibapt-pkg
:major
=${LIBAPT_MAJOR}
137 dh_makeshlibs
-m
${LIBAPT_MAJOR} -Vlibapt-pkg
${LIBAPT_MAJOR} -papt
142 @echo
>&2 'source and diff are obsolete - use dpkg-source -b'; false
149 # Update from CVS and then configure for build
150 super-l33ch
: l33ch Makefile.in
155 l33ch-stamp
: super-l33ch
159 -find
-name Makefile.in
-print0 | xargs
-0r
rm -f
160 find
-name ChangeLog | xargs
rm -f
163 binary
: binary-indep binary-arch
164 .PHONY
: build
clean binary-indep binary-arch binary
167 # Done by the uploader.
169 #edit debian/changelog
170 # configure.in has the version automatically updated now.
172 # debian/rules cvs-build
175 rm -rf debian
/cvs-build
179 tar c
--exclude CVS
--exclude debian
/cvs-build . |\
180 (mkdir
-p debian
/cvs-build
/apt-
$(APT_DEBVER
);cd debian
/cvs-build
/apt-
$(APT_DEBVER
);tar x
)
181 # The next line isn't needed, as debuild will make the .tar.gz for us.
182 # (cd debian/cvs-build;tar zcf apt_$(APT_DEBVER).tar.gz apt-$(APT_DEBVER))
183 (cd debian
/cvs-build
/apt-
$(APT_DEBVER
);$(DEB_BUILD_PROG
) -us
-uc
)