$Id$ Building CSVEdit ================ Preparations ------------ Environment: The csvedit project is structured to develop it in an up-to-date Ubuntu installation. Usually the current and previous Ubuntu release are satisfying, an up-to-date Debian installation might work also, but that'd rather be testing than stable. Package archives: Until some day Wolfgang Glas' extensive contributions (mingw-64) find their way into distributions' cores, one needs to include clazzes.org's PPA in one's list of package sources. For detailed instructions, see "Technical details about this PPA" on https://launchpad.net/~clazzes.org/+archive/ppa and http://www.clazzes.org/ppa Build dependencies for Linux: sudo apt-get install \ build-essential libqt4-dev qt4-dev-tools perl Recommended packages providing QT 4 tools and docs: sudo apt-get install qt4-doc qt4-doc-html qt4-qtconfig Additional build dependencies for building windows binaries and installers: sudo apt-get install mingw-w32-qt4 mingw-w64-qt4 tofrodos Yet additional build dependencies for building signed windows binaries: sudo apt-get install osslsigncode All dependencies in one: sudo apt-get install \ build-essential libqt4-dev qt4-dev-tools perl \ qt4-doc qt4-doc-html qt4-qtconfig mingw-w32-qt4 mingw-w64-qt4 osslsigncode Building manually ----------------- First, chdir in the directory of the target you want to build, i.e. - Debug for debugging and valgrinding - Release for releasing (although debian packages are preferred for real releases) - Mingw32 for Win32 - Mingw32-i586 for Win32 with i586 (pre P4) CPUs without SSE2 - Mingw64 for Win64 Optionally edit config.data (only necessary rarely). If it's your first build, call ../src/scripts/config.pl If you have changed config.data or src/*.in and want to make sure all is re-configured either to the same or shortly call ./reconfigure.sh Finally, the usual make As of now there is no install rule, our way is to make debian packages, even for testing on development machines. So, DO NOT make install but read the debian chapters below. Building debian binary packages ------------------------------- If you have made any changes first thing is to extend the file ... debian/changes ... very carefully (you have to follow the syntax very strict). Dependent on eventual changes to the code, you need to update debian/control and/or debian/rules too. To finally (try to) build a binary package for your system: dpkg-buildpackage -b -tc -uc -us If you want to create a signed package: MYEMAIL=myemail@foo.org KEYID=$(gpg --list-secret-keys $MYEMAIL |egrep ^sec |head -1 |cut -f2 -d'/' |cut -f1 -d' ') dpkg-buildpackage -b -tc -k${KEYID} For advanced debian packaging see far below. Building windows installer packages ----------------------------------- First, in scripts/ create and edit scripts/environment.sh to provide your code signing settings: cd scripts test -e environment.sh || cp -a environment.sh.template environment.sh vi environment.sh cd .. To create both windows installer packages, just call scripts/make_installers.sh I18n (Translations) ------------------- If you have added translatable strings (anything in trUtf8()) or just want to add or change translations, do something like this: cd src lupdate-qt4 csvedit.pro linguist-qt4 csvedit_de.ts # and optionally lupdate-qt4 -noobsolete csvedit.pro lrelease-qt4 csvedit.pro Building and using debian source packages ----------------------------------------- To create signed binary and source packages: MYEMAIL=myemail@foo.org export KEYID=$(gpg --list-secret-keys $MYEMAIL |egrep ^sec |head -1 |cut -f2 -d'/' |cut -f1 -d' ') scripts/make_debian-sourcepackage.sh To test these source packages seriously, pbuilder environments are needed. First create or update the pbuilder environments, i.e. hardy amd64: pbuilder --create \ --basetgz /var/cache/pbuilder/base-hardy-amd64.tgz \ --mirror http://at.archive.ubuntu.com/ubuntu/ \ --distribution hardy \ --http-proxy http://127.0.0.1:3128/ \ Do not forget to add the clazzes.org PPA and so on (adapt to your taste): pbuilder --login \ --basetgz /var/cache/pbuilder/base-hardy-amd64.tgz \ --save-after-exec # you are now chrooted "in base-hardy-amd64.tgz" echo 'Acquire { http { Proxy "http://127.0.0.1:3128/"; } }' > /etc/apt/apt.conf.d/proxy echo 'Acquire { ftp { Proxy "http://127.0.0.1:3128/"; } }' >> /etc/apt/apt.conf.d/proxy apt-get install ubuntu-keyring gnupg wget mkdir -pv /etc/apt/sources.list.d echo "deb http://ppa.launchpad.net/clazzes.org/ppa/ubuntu hardy main" >/etc/apt/sources.list.d/clazzes_ppa.list wget http://www.clazzes.org/gpg/clazzes_ppa.asc -O - | apt-key add - apt-get update apt-get dist-upgrade apt-get clean exit # you are now back out again Then feed the source packages into that pbuilders: pbuilder --build \ --basetgz /var/cache/pbuilder/base-hardy-amd64.tgz \ --save-after-exec \ csvedit_1.0.0.0-0.dsc Finally, evtl. upload them to the PPA: In your ~/.dput.cf you need this: [clazzes-ppa] fqdn = ppa.launchpad.net method = ftp incoming = ~clazzes.org/ppa/ubuntu/ login = anonymous allow_unsigned_uploads = 0 Then you can upload the fresh dsc: MYEMAIL=myemail@foo.org export KEYID=$(gpg --list-secret-keys $MYEMAIL |egrep ^sec |head -1 |cut -f2 -d'/' |cut -f1 -d' ') scripts/feed_clazzes_ppa.sh