Chris Cheney writes: > On Tue, Apr 13, 2004 at 11:15:33AM +0200, Zsolt Rizsanyi wrote: >> Hi! >> >> Are there any guidlines on how to package a kde application where >> changes are necessary in one or more Makefile.am-s ? >> >> If I just leave the Makefile regeneration to the make process then >> it does not succeed because the automake version of the upstream >> does not match the version I have from debian. >> >> If I try to rebuild the makefiles I get problems with *.moc >> autogeneration. >> >> Is there some solution to these problems?
> My sources don't have .moc files in them they are created in my > build dir, not source dir. Hm, right, I need to change this in my rules file as well.. > What I normally do at least for official kde packages is: > <snip> I wrote a script for kdebindings that does this for me. It's pretty straightforward, except that it uses a fancy trick for applying the patches automatically. I'm attaching it here, maybe it's useful for other people as well. > The uuencode is needed for binary updates in branch releases since > regular debian diff.gz can't have binary data in them directly. Also > note that if you have to do builds often of the same code for > testing purposes debuild can be made to use ccache very easily. Very interesting, I definitely need to look at this :) cheers domi
RELEASE="3.2" MINOR="2" MODULE="kdebindings" CVSROOT=":pserver:[EMAIL PROTECTED]:/home/kde" version="${RELEASE}.$MINOR" releasedir="$MODULE-$version.orig" branchdir="$MODULE-$version" release_tag=KDE_${RELEASE//./_}_${MINOR}_RELEASE branch_tag=KDE_${RELEASE//./_}_BRANCH # export the modules echo "Checking out $releasedir..." cvs -d$CVSROOT export -r${release_tag} $MODULE > /dev/null mv "$MODULE" "$releasedir" echo "Checking out $branchdir..." cvs -d$CVSROOT export -r${branch_tag} $MODULE > /dev/null mv "$MODULE" "$branchdir" echo "Creating 001-$MODULE-branch.diff..." # remove .cvsignore files find "$releasedir" -name '.cvsignore' | xargs rm -f find "$branchdir" -name '.cvsignore' | xargs rm -f # we don't want debian/* stuff diffed in the branch diff tempdir=`mktemp -d` mv "$releasedir/debian" "$tempdir" cp -r "$branchdir/debian" "$releasedir" # the branch diff temp=`tempfile` diff -Nrua "$releasedir" "$branchdir" > $temp cat $temp | uuencode 001-$MODULE-branch.diff > "$branchdir/debian/patches/001-$MODULE-branch.diff.uu" cd "$branchdir" # first unapply the branch patch, it will be reapplied by debian/rules # configure patch -p1 -R < $temp > /dev/null cd ../ rm -f "$temp" echo "Creating ${MODULE}_${version}.orig.tar.gz..." # move back the old debian dir rm -rf "$releasedir/debian" mv "$tempdir/debian" "$releasedir" rm -rf "$tempdir" # tarball releasedir make -C "$releasedir" -f "admin/Makefile.common" rm -rf "$releasedir/autom4te.cache" tar -czf "${MODULE}_${version}.orig.tar.gz" "$releasedir" echo "Preparing $branchdir..." # build the package ! cd "$branchdir" # this is a hack: we pretend that configure already exists, so that it # is not built by the rules script ( by make -f admin/Makefile.common # ), and it is subsequently attempted to be run with a lot of args, # but it simply ignores them echo "echo 'this is a fake configure \!'" > configure chmod a+x configure make -f debian/rules configure rm -f configure-stamp rm -f configure # now that the patches are applied, we can build the Makefile.in's and # the configure script make -f admin/Makefile.common echo "Building..." # now that this is all done, we're ready to go ! debuild -sa