I am trying to turn Spamdyke 4.3.1 (download link) into Debian package (.deb). This is pretty easy software to build, no crazy dependencies, just libssl-dev so:
apt-get install build-essential devscripts \
debhelper dh-make libssl-dev
and then once you unpack the sources:
cd spamdyke-4.3.1/spamdyke
./configure --exec_prefix=/usr
make
and usual
make install
As I am willing to make the Debian package out of this software, I created all the necessary files in debian/ folder and modified its install target in spamdyke/Makefile.in by adding ${DESTDIR}:
install: spamdyke
cp spamdyke ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}/usr/local/bin/spamdyke
ln -s ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}/usr/local/bin/spamdyke
But my current problem is that the distribution archive keeps all the sources in spamdyke/ folder instead of root folder which is not what dh_* tools expect to do all the heavy lifting automatically:
drwxr-xr-x 4 vagrant vagrant 4096 Feb 3 10:57 debian
drwxr-xr-x 3 vagrant vagrant 4096 Jan 30 19:43 documentation
drwxr-xr-x 2 vagrant vagrant 4096 Feb 5 21:00 spamdyke
drwxr-xr-x 997 vagrant vagrant 77824 Jan 30 19:43 tests
drwxr-xr-x 2 vagrant vagrant 4096 Jan 20 2012 utils
Unfortunately I am unable to create correct debian/rules to make all the packaging work. I would love to keep my debian/rules as simple as possible and frankly I hoped that pointing it to spamdyke source folder with --builddirectory option would be sufficient at least for configure and build steps. My current debian/rules now looks like this:
#!/usr/bin/make -f
export DH_VERBOSE = 1
%:
dh $@ --builddirectory=spamdyke
override_dh_auto_configure:
dh_auto_configure --builddirectory=spamdyke -- --exec_prefix=/usr
override_dh_auto_build:
dh_auto_make --builddirectory=spamdyke
however debuild -b -us -uc produces pretty empty .deb package in result, with lintian complaining about empty-binary-package:
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build spamdyke-4.3.1
dpkg-buildpackage: binary-only upload (no source included)
Now running lintian...
W: spamdyke: new-package-should-close-itp-bug
E: spamdyke: copyright-should-refer-to-common-license-file-for-gpl
W: spamdyke: empty-binary-package
Finished running lintian.
I hope must be missing something obvious here, but at the moment I am unable to find out what to search for. Any hints appreciated. Thanks in advance.