2012/9/23 Mattias Gaertner :
Have you tried removing ~/.lazarus?
No, it always starts with a freshly bootstrapped clean and virgin virtual ubuntu server, I have no other influence than specifying build dependencies in the source package and maybe some ugly hackish trickery in my "all" target. Here is the complete log:
https://launchpadlibrarian.net/117046564/buildlog_ubuntu-precise-i386.laz-launchpad-example_1.0.2-ppa1_FAILEDTOBUILD.txt.gz
here is my Makefile:
# this will be the name of our ubuntu package
PACKAGENAME = laz-launchpad-example
# you need a new UPSTREAMVERSION everytime you try a new upload to # launchpad because this will be considered the version of the # upstream .orig.tar.gz and since we basically *are* upstream and indeed # have changed upstream sources we also need a new uptream version number UPSTREAMVERSION = 1.0.2
FULLDEBVERSION = $(UPSTREAMVERSION)-ppa1
DESCRIPTION = demo package
EXDESCRIPTION = extended description may not be empty AUTHOR = Bernd Kreuss
COPYRIGHT = 2012 $(AUTHOR)
# this must be the same email address used in launchpad AND in the gpg key! # make ubuntu_upload will ask for passphrase to sign the source package # and after uploading launchpad will check the signature to authenticate you EMAIL =
PPANAME = ppa:prof7bit/lazarus-ppa-skeleton
# some licenses need a second line referring to the license file LICENSE = GPL-2
LICENSE2 = /usr/share/common-licenses/GPL-2
# more tweaking can be done by directly altering the code # that creates the debian/* files near the end of this makefile
DISTRIBUTION = precise
BUILD_DEPENDS = lazarus, lcl-utils, debhelper (>= 8) DEPENDS =
EXENAME = project1
LPINAME = project1.lpi
SRCDIRNAME = $(PACKAGENAME)-$(UPSTREAMVERSION)
TARBALLNAME = $(PACKAGENAME)_$(UPSTREAMVERSION).orig.tar.gz
# need bash with extglob for some of the synax in this makefile SHELL = /bin/bash -O extglob
########################################################## # all, clean and install are totally standard stuff and # # are supposed to work the same without debuild. # ##########################################################
# all will build the entire project from source, using lazbuild, # this assumes that there exists a build mode "Release" all:
#lazbuild --build-mode=Release $(LPINAME)
lazbuild --build-mode=Debug $(LPINAME)
# clean will remove all compiled files
clean:
$(RM) -r lib
$(RM) $(EXENAME)
$(RM) *.res
$(RM) -r DEBUILD
# install all the files into their final destinations. This should # work without debuild (for testing or normal install without .deb) # and also work when called during debuild (debuild will also set # the $(DESTDIR) variable to install into a fakeroot) so don't forget # to prefix all destination paths with $(DESTDIR) and also don't forget # to install with -D so that it will create missing directories. install:
install -D $(EXENAME) $(DESTDIR)/usr/bin/$(EXENAME)
# uninstall is not used for the packaging, or anywhere else, I only use # it during development after testing the installer on my local machine uninstall:
$(RM) /usr/bin/$(EXENAME)
#########################################
# here comes the debian specific stuff. #
#########################################
# make ubuntu_src does everything needed to create a debian source package. # It will create a BUILDEB directory, copy the entire source there, # make the .orig.tar.gz tarball from it and then call itself again from # within this new location to make the debian files and all the rest. # after this has completed you can call make ubuntu_upload ubuntu_src: _copyorig
$(MAKE) -C DEBUILD/$(SRCDIRNAME) _ubuntu_src
# make ubuntu_bin is similar to ubuntu_src but it makes a binary package # this should be used to debug the build proces, test the .deb but it # can not be used to produce the source package. Use this only for # debugging. Use ubuntu_src instead to produce the launchpad upload files. ubuntu_bin: _copyorig
$(MAKE) -C DEBUILD/$(SRCDIRNAME) _ubuntu_bin
# after you have run make ubuntu_src (and confirmed that all is ok) # you call make ubuntu_upload which will then sign your source package # and upload it to your ppa. It will first ask you for your gpg # passphrase twice to sign the two files (.dsc and .changes) and then # upload them using dput. You don't need your launchpad password, # launchpad will authenticate you by your gpg signature, launchpad will # send you a notification email to inform you about errors or success. ubuntu_upload:
cd DEBUILD/$(SRCDIRNAME); debsign -S
dput $(PPANAME) DEBUILD/$(PACKAGENAME)_$(FULLDEBVERSION)_source.changes
_copyorig: clean
mkdir -p DEBUILD/$(SRCDIRNAME)
cp -r !(DEBUILD) DEBUILD/$(SRCDIRNAME)/
cd DEBUILD; tar czf $(TARBALLNAME) $(SRCDIRNAME)
#################################################### # everything below happens when we are in the copy # # of the source files inside the DEBUILD directory # ####################################################
_ubuntu_bin: _debfiles _package_bin
_ubuntu_src: _debfiles _package_src
_debfiles: _debdir _changelog _compat _control _copyright _rules
_debdir:
mkdir debian
# this are the changes between upstream and deb. Since we always take # the latest upstream and apply no changes other than debianizing it # this change log will never contain more than one item" _changelog:
echo "$(PACKAGENAME) ($(FULLDEBVERSION)) $(DISTRIBUTION);
urgency=low" > debian/changelog
echo "" >> debian/changelog
echo " * Upstream release." >> debian/changelog
echo "" >> debian/changelog
echo " -- $(AUTHOR) <$(EMAIL)> `date -R`" >> debian/changelog
# compat contains only a magic number
_compat:
echo 8 > debian/compat
# creates the control file. runtime dependencies will be # automatically detected and inserted by debuild
_control:
echo "Source: $(PACKAGENAME)" > debian/control
echo "Maintainer: $(AUTHOR) <$(EMAIL)>" >> debian/control echo "Section: misc" >> debian/control
echo "Priority: optional" >> debian/control
echo "Standards-Version: 3.9.3" >> debian/control
echo "Build-Depends: $(BUILD_DEPENDS)" >> debian/control echo "" >> debian/control
echo "Package: $(PACKAGENAME)" >> debian/control
echo "Architecture: any" >> debian/control
echo "Depends: \$${shlibs:Depends}, \$${misc:Depends}, $(DEPENDS)" >> debian/control
echo "Description: $(DESCRIPTION)" >> debian/control echo " $(EXDESCRIPTION)" >> debian/control
# copyright file syntax is a bit tricky and and some licenses need # to refer to their license text file or lintian will complain. # see also the debian policy, there may be multiple paragraphs # referrimg to different files having different licenses. The code # below simply assumes all files have the same license. _copyright:
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
debian/copyright
echo "" >> debian/copyright
echo "Files: *" >> debian/copyright
echo "Copyright: $(COPYRIGHT)" >> debian/copyright echo "License: $(LICENSE)" >> debian/copyright
echo " $(LICENSE2)" >> debian/copyright
echo "" >> debian/copyright
# rules file. This is a makefile wrapping some deep debian voodoo, # can be used to override targets in the build process, we don't need # to mess around with it, leave it as is.
_rules:
echo "#!/usr/bin/make -f" > debian/rules
echo "" >> debian/rules
echo "%:" >> debian/rules
echo " dh \$$@" >> debian/rules
_package_src:
debuild -S -d -us -uc
_package_bin:
debuild -d -us -uc