As a barebone the structure is pretty simple.
Code: Select all
Source: sphirewall-libs
Priority: extra
Maintainer: root <root@fwalltest1.toc.org.nz>
Build-Depends: debhelper (>= 7), autotools-dev
Standards-Version: 3.7.3
Section: libs
Homepage: <insert the upstream URL, if relevant>
Package: sphirewall-libs-dev
Section: libdevel
Architecture: any
Depends: sphirewall-libs0 (= ${binary:Version})
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Package: sphirewall-lib0
Section: libs
Architecture: any
Depends: libtool
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
This is what happens when I run dpkg-buildpackage
Code: Select all
root@fwalltest1:/usr/src/sphirewall-libs-0.9.5.0# dpkg-buildpackage -j4
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value:
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package sphirewall-libs
dpkg-buildpackage: source version 0.9.5.0-1
dpkg-buildpackage: source changed by root <root@fwalltest1.toc.org.nz>
dpkg-buildpackage: host architecture i386
debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || /usr/bin/make distclean
rm -f config.sub config.guess
dh_clean
dpkg-source -b sphirewall-libs-0.9.5.0
dpkg-source: info: using source format `1.0'
dpkg-source: info: building sphirewall-libs using existing sphirewall-libs_0.9.5.0.orig.tar.gz
dpkg-source: info: building sphirewall-libs in sphirewall-libs_0.9.5.0-1.diff.gz
dpkg-source: warning: executable mode 0755 of 'missing' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'ltmain.sh' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'install-sh' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'configure' will not be represented in diff
dpkg-source: warning: executable mode 0755 of 'depcomp' will not be represented in diff
dpkg-source: warning: newly created empty file 'debian/docs' will not be represented in diff
dpkg-source: info: building sphirewall-libs in sphirewall-libs_0.9.5.0-1.dsc
debian/rules build
dh_testdir
# Add here commands to configure the package.
cp -f /usr/share/misc/config.sub config.sub
cp -f /usr/share/misc/config.guess config.guess
./configure --build i486-linux-gnu --prefix=/usr --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info CFLAGS="-g -O2" LDFLAGS="-Wl,-z,defs"
====Configure continues to run as expected ====
configure: creating ./config.status
config.status: creating libSphirewallCommon/src/Makefile
config.status: creating libSphirewallBandwidth/src/Makefile
config.status: creating libSphirewallManagementSvc/src/Makefile
config.status: creating libSphirewallQueue/src/Makefile
config.status: creating Makefile
config.status: creating autoconf.h
config.status: executing depfiles commands
config.status: executing libtool commands
dh_testdir
# Add here commands to compile the package.
/usr/bin/make
make[1]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0'
/usr/bin/make all-recursive
make[2]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0'
Making all in libSphirewallBandwidth/src
make[3]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0/libSphirewallBandwidth/src'
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -I../include -I/usr/local/include/thrift -I../../common/include -rdynamic -g -O2 -MT SBandwidthServer.lo -MD -MP -MF .deps/SBandwidthServer.Tpo -c -o SBandwidthServer.lo SBandwidthServer.cpp
===== Make also runs as expected ====
make[1]: Leaving directory `/usr/src/sphirewall-libs-0.9.5.0'
touch build-stamp
debian/rules binary
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp
/usr/bin/make DESTDIR=/usr/src/sphirewall-libs-0.9.5.0/debian/tmp install
make[1]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0'
Making install in libSphirewallBandwidth/src
make[2]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0/libSphirewallBandwidth/src'
make[3]: Entering directory `/usr/src/sphirewall-libs-0.9.5.0/libSphirewallBandwidth/src'
test -z "/usr/lib" || /bin/mkdir -p "/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/lib"
test -z "/usr/include/sphirewall" || /bin/mkdir -p "/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/include/sphirewall"
/bin/sh ../../libtool --mode=install /usr/bin/install -c 'libSphirewallBandwidth.la' '/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/lib/libSphirewallBandwidth.la'
/usr/bin/install -c -m 644 '../include/sphirewall_bandwidth_types.h' '/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/include/sphirewall/sphirewall_bandwidth_types.h'
/usr/bin/install -c -m 644 '../include/SBandwidthServer.h' '/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/include/sphirewall/SBandwidthServer.h'
/usr/bin/install -c -m 644 '../include/sphirewall_bandwidth_constants.h' '/usr/src/sphirewall-libs-0.9.5.0/debian/tmp/usr/include/sphirewall/sphirewall_bandwidth_constants.h'
==== Make install runs as expected ===
Make install appears to install the binary libs to debian/tmp/usr/lib, which is cool.
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `sphirewall-libs-dev' in `../sphirewall-libs-dev_0.9.5.0-1_i386.deb'.
dpkg-deb: building package `sphirewall-lib0' in `../sphirewall-lib0_0.9.5.0-1_i386.deb'.
dpkg-genchanges >../sphirewall-libs_0.9.5.0-1_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload (original source is included)
Code: Select all
root@fwalltest1:/usr/src/sphirewall-libs-0.9.5.0# dpkg-deb -c ../sphirewall-lib0_0.9.5.0-1_i386.deb
drwxr-xr-x root/root 0 2010-07-03 04:19 ./
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/doc/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/doc/sphirewall-lib0/
-rw-r--r-- root/root 183 2010-07-03 04:12 ./usr/share/doc/sphirewall-lib0/changelog.Debian.gz
-rw-r--r-- root/root 664 2010-07-03 04:12 ./usr/share/doc/sphirewall-lib0/copyright
Code: Select all
root@fwalltest1:/usr/src/sphirewall-libs-0.9.5.0# dpkg-deb -c ../sphirewall-libs-dev_0.9.5.0-1_i386.deb
drwxr-xr-x root/root 0 2010-07-03 04:19 ./
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/lib/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/doc/
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/share/doc/sphirewall-libs-dev/
-rw-r--r-- root/root 183 2010-07-03 04:12 ./usr/share/doc/sphirewall-libs-dev/changelog.Debian.gz
-rw-r--r-- root/root 664 2010-07-03 04:12 ./usr/share/doc/sphirewall-libs-dev/copyright
-rw-r--r-- root/root 195 2010-07-03 04:12 ./usr/share/doc/sphirewall-libs-dev/README.Debian
drwxr-xr-x root/root 0 2010-07-03 04:19 ./usr/include/
Code: Select all
root@fwalltest1:/usr/src/sphirewall-libs-0.9.5.0# ls debian/tmp/usr/lib/
libSphirewallBandwidth.a libSphirewallBandwidth.so.2 libsphirewallcommon.la libsphirewallcommon.so.2.1.12 libSphirewallManagementSvc.so libSphirewallQueue.a libSphirewallQueue.so.2
libSphirewallBandwidth.la libSphirewallBandwidth.so.2.1.12 libsphirewallcommon.so libSphirewallManagementSvc.a libSphirewallManagementSvc.so.0 libSphirewallQueue.la libSphirewallQueue.so.2.1.12
libSphirewallBandwidth.so libsphirewallcommon.a libsphirewallcommon.so.2 libSphirewallManagementSvc.la libSphirewallManagementSvc.so.0.0.0 libSphirewallQueue.so
Any ideas what I am doing wrong here ?