All of the Debian packaging examples I can find assume the user is re-packaging from an upstream build, so it unpacks a source tarball, configures, rebuilds, and re-packages. I'm trying to build a package for my own library, which is built using autotools. I've tried several different approaches, and my latest attempt looks like this:
DH_PACKAGE_NAME=`echo $(PACKAGE_NAME) | sed s/_/-/g`
dist-hook:
cd $(distdir) ; \
export DEBFULLNAME="Some One" ; \
export DEBEMAIL="[email protected]" ; \
echo -e "\n" | dh_make --copyright blank --library --native \
--packagename $(DH_PACKAGE_NAME)
mv $(distdir)/debian $(distdir)/DEBIAN
dpkg-deb --build $(distdir)
for which dpkg-deb
complains about dh_makes
control file. I have an inkling the solution is something far simpler?
A Debian source package contains the source material used to construct one or more binary packages. A source package consists of a . dsc file (see Debian source control files – . dsc), one or more compressed tar files, and possibly other files depending on the type and format of source package.
the entire packaging process is streamlined towards wrapping the build-process into the packaging-process. trying to wrap the packaging-process into the build-process is therefore probably not super easy, but i don't see a necessity to not do it the standard way.
so:
dpkg-buildpackage
./configure && make && make install
this is better practice, as it keeps 2 separate stages (building and packaging) apart. it also allows more easy integration into any Debian-based distribution (should you e.g. decide that it would be great to have your package in "real" Debian), since Debian packaging guidelines are quite strict about keeping those two processes apart (upstream-sources that ship their own debian/ are frowned upon and upstream's debian/ is usually removed)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With