Small update.
Packages are now available in the following PPA for Ubuntu Trusty:
Main goal was to make creating a Debian package, ready for upload to Ubuntu's Launchpad, trivial -- and not necessarily correct. Another goal was to empower other people to create their own packages (depending, of course, on a recent SVN revision of gnustep-make). There are better Debian packages out there (Philippe etc). If correctness is desired, I heartily recommend using them.
I currently targeted Ubuntu Trusty and not Debian proper, because of Canonical's nice build farm.
Caveats:
- Packages are not Lintian-clean, and they don't currently make distinctions between libgnustep-* from libgnustep*-dev or -doc. That's slightly more difficult to do with this kind of automation.
- Packages don't even have prefix lib* when they should.
- I make no guarantee that I'll be updating the packages regularly or that I'll expand the covered packages. (Since it's trivial to do so I probably will.)
- Packages don't use libobjc2. libobjc2 would need to be packaged first, which is just slightly more work, as it uses cmake.
- Packages don't build with clang. Because Debian. I could and will hack it together at some point.
- There is an inconsistency between building gnustep-make and every other package. (Especially with how and when to get tarball version to have SVN revision and date-time appended to it.)
- We don't want to list build dependencies in the shell script, but set them in the project's GNUmakefile (or in .spec file). I never got around to it.
- There are multiple targets manually called from the shell script. This is intentional, to allow for optional customization between steps, without touching the makefiles themselves. (Also, people may in the future want to do 'make debfiles' only once, to avoid overwriting changelog, and then manually deploy and unpack .orig.tar.gz before using 'make deb' for other steps. Since my main goal here was to provide trivial-to-build packages that are also trivial to install, and to provide tools for others to build and deploy their own packages, and since I don't really want to go into the business of packaging, this wasn't done.)
- Missing is a stub package that will depend on other packages. Sorry about that.
- You still need to add an inclusion of Master/deb.make manually to GNUmakefiles. Sorry about that.
- In the shellscript below, gnustep-pure/ and gnustep/ are simply two checkouts of GNUstep's modules/ tree, the gnustep/ one having some local uncommitted modifications, while gnustep-pure/ actually only contains modules/core/. The actual paths don't matter, though.
Note how the build processes for gnustep-make and Ink differ.
- gnustep-make has a 'special' build process separate from the rules it itself defines.
- Ink is not maintained as nicely as other packages, so I had some trouble getting it to create tarball with 'svn-snapshot' target. I should probably take another look at that.
Again, one of the goals was to empower people to create their own packages. So if you maintain a project and want a Debian package, give this approach a shot. You'll need a GPG key named the same as in DEB_PACKAGE_BUILDER variable, and you'll need to associate it with your PPA. After you create a PPA repository on Launchpad and build a package, the 'dput' command makes it trivial to upload the package. PRIORITY=low is a nice default; in the script below I'm upgrading it to normal so the build is slightly prioritized and I don't have what is sometimes an 8 hour delay. For a continuous build, I would (of course) be a nice guy and set it to low.
export DEB_PACKAGE_BUILDER="Your Name <your@email.example>"
export DEB_BUILD_OPTIONS="parallel=16" # I have a 4-core CPU, 8 with hyperthreading; so doubling should be fine.
export CC=gcc # In my bash_profile I define CC to clang. Rolling back to default here.
export CXX=g++
export PRIORITY=normal
# We can create a Debian package from current revision (svn-snapshot) or from
# current working copy (svn-export).
if false ; then
DIST_ACTION=svn-export
export TARBALL_VERSION_INCLUDE_SVN_REVISION=yes
export TARBALL_VERSION_INCLUDE_DATE_TIME=yes
export DEB_VERSION_SUFFIX=1.$(date +%Y.%m.%d.%H.%M)
else
DIST_ACTION=svn-snapshot
export TARBALL_VERSION_INCLUDE_SVN_REVISION=yes
export TARBALL_VERSION_INCLUDE_DATE_TIME=no
export DEB_VERSION_SUFFIX=1
fi
if true ; then
(cd gnustep-pure/core/make &&
./configure &&
make debclean &&
make ${DIST_ACTION} &&
export DEB_TARBALL_VERSION=$(cat ${DIST_ACTION}-tarball-version) &&
make debfiles &&
sed -i 's/low/'${PRIORITY}'/' debian_dist/gnustep-make-${DEB_TARBALL_VERSION}/debian/changelog &&
make deb debsign=yes &&
sudo dpkg -i debian_dist/*${DEB_TARBALL_VERSION}*.deb)
fi &&
if true ; then
(cd gnustep-pure/core/base &&
export DEB_BUILD_DEPENDS="gobjc, libffi-dev, libxml2-dev, libicu-dev, libgmp3-dev, libssl-dev, libxslt-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libgnutls-dev" &&
export DEB_DEPENDS="gnustep-make" &&
. $(gnustep-config --variable=GNUSTEP_MAKEFILES)/GNUstep.sh &&
./configure --with-installation-domain=SYSTEM &&
make debclean &&
make ${DIST_ACTION} &&
make debfiles &&
sed -i 's/low/'${PRIORITY}'/' obj/debian_dist/gnustep-base-*/debian/changelog &&
make deb debsign=yes &&
sudo dpkg -i obj/debian_dist/*.deb)
fi &&
if true ; then
(cd gnustep-pure/core/gui &&
export DEB_BUILD_DEPENDS="gobjc, libffi-dev, libxml2-dev, libicu-dev, libgmp3-dev, libssl-dev, libxslt-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libgnutls-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libjpeg-dev, libtiff-dev, libpng-dev, libcairo-dev, libxt-dev, libgl1-mesa-dev, libglu1-mesa-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, gnustep-base" &&
export DEB_DEPENDS="gnustep-make, gnustep-base" &&
. $(gnustep-config --variable=GNUSTEP_MAKEFILES)/GNUstep.sh &&
./configure &&
make debclean &&
make ${DIST_ACTION} &&
make debfiles &&
sed -i 's/low/'${PRIORITY}'/' obj/debian_dist/gnustep-gui-*/debian/changelog &&
make deb debsign=yes &&
sudo dpkg -i obj/debian_dist/*.deb)
fi &&
if true ; then
(cd gnustep-pure/core/back &&
export DEB_BUILD_DEPENDS="gobjc, libffi-dev, libxml2-dev, libicu-dev, libgmp3-dev, libssl-dev, libxslt-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libgnutls-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libjpeg-dev, libtiff-dev, libpng-dev, libcairo-dev, libxt-dev, libgl1-mesa-dev, libglu1-mesa-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, gnustep-base, gnustep-gui" &&
export DEB_DEPENDS="gnustep-make, gnustep-base, gnustep-gui" &&
. $(gnustep-config --variable=GNUSTEP_MAKEFILES)/GNUstep.sh &&
./configure &&
make debclean &&
make ${DIST_ACTION} &&
make debfiles &&
sed -i 's/low/'${PRIORITY}'/' obj/debian_dist/gnustep-back-*/debian/changelog &&
make deb debsign=yes &&
sudo dpkg -i obj/debian_dist/*.deb)
fi &&
if true ; then
(cd gnustep/usr-apps/examples/gui/Ink &&
DIST_ACTION=svn-export &&
export TARBALL_VERSION_INCLUDE_SVN_REVISION=yes &&
export TARBALL_VERSION_INCLUDE_DATE_TIME=yes &&
export DEB_VERSION_SUFFIX=1.$(date +%Y.%m.%d.%H.%M) &&
export DEB_BUILD_DEPENDS="gobjc, libffi-dev, libxml2-dev, libicu-dev, libgmp3-dev, libssl-dev, libxslt-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libgnutls-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, libjpeg-dev, libtiff-dev, libpng-dev, libcairo-dev, libxt-dev, libgl1-mesa-dev, libglu1-mesa-dev" &&
export DEB_BUILD_DEPENDS="${DEB_BUILD_DEPENDS}, gnustep-base, gnustep-gui" &&
export DEB_DEPENDS="gnustep-make, gnustep-base, gnustep-gui" &&
export DEB_RECOMMENDS="gnustep-back" &&
. $(gnustep-config --variable=GNUSTEP_MAKEFILES)/GNUstep.sh &&
make debclean &&
make ${DIST_ACTION} &&
make debfiles &&
sed -i 's/low/'${PRIORITY}'/' obj/debian_dist/gnustep-Ink-*/debian/changelog &&
make deb debsign=yes &&
sudo dpkg -i obj/debian_dist/*.deb)
fi &&
echo "Done"
echo "dput ppa:your-launchpad-username/your-launchpad-repository gnustep-pure/core/{make,base/obj,gui/obj,back/obj}/debian_dist/*_source.changes gnustep/usr-apps/examples/gui/Ink/obj/debian_dist/*_source.changes"