diff --git a/build_scripts/Debian+Ubuntu/makeSourcePackage.sh b/build_scripts/Debian+Ubuntu/makeSourcePackage.sh index 9e3bd4fff..553a0587e 100755 --- a/build_scripts/Debian+Ubuntu/makeSourcePackage.sh +++ b/build_scripts/Debian+Ubuntu/makeSourcePackage.sh @@ -27,6 +27,7 @@ time=`git log --pretty=format:"%aD" | head -1 | cut -d\ -f5 | sed -e s/://g` hhsh=`git log --pretty=format:"%H" | head -1 | cut -c1-8` rev=${date}.${hhsh} +useretrotor="false" while [ ${#} -gt 0 ]; do case ${1} in @@ -34,6 +35,9 @@ while [ ${#} -gt 0 ]; do rev=${1} shift ;; + "-retrotor") shift + useretrotor="true" + ;; "-distribution") shift dist=${1} shift @@ -71,6 +75,10 @@ echo " "Hash : ${hhsh} echo " "Using branch : ${branch} echo " "Using revision : ${rev} +if test ${useretrotor} = "true"; then + echo " "Specific flags : retrotor +fi + echo Done. version="${version}"."${rev}" echo Got version number ${version}. @@ -121,6 +129,10 @@ for i in ${dist}; do echo copying changelog for ${i} sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g ../changelog > debian/changelog + if test ${useretrotor} = "true"; then + cp ../rules.retrotor debian/rules + fi + if test -f ../control."${i}" ; then echo \/\!\\ Using specific control file for distribution "${i}" cp ../control."${i}" debian/control diff --git a/build_scripts/Debian+Ubuntu/rules.retrotor b/build_scripts/Debian+Ubuntu/rules.retrotor new file mode 100755 index 000000000..a5cc9dd9a --- /dev/null +++ b/build_scripts/Debian+Ubuntu/rules.retrotor @@ -0,0 +1,61 @@ +#!/usr/bin/make -f + +configure: configure-stamp +configure-stamp: + dh_testdir + cd src && qmake "CONFIG-=debug" "CONFIG+=release" "CONFIG+=rs_autologin" PREFIX=/usr LIB_DIR=/usr/lib RetroShare.pro + touch $@ + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + # Add here commands to compile the package. + # cd libssh-0.6.4 && mkdir -p build && cd build && cmake -DWITH_STATIC_LIB=ON .. && make + # cd sqlcipher && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" && make + # mkdir lib + # cp -r libssh-0.6.4 lib/ + #cp -r sqlcipher lib/ + #cd src/rsctrl/src && make + cd src && $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp + # Add here commands to clean up after the build process. + [ ! -f src/Makefile ] || (cd src && $(MAKE) distclean) + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + #dh_installdirs + cd src && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/tmp install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_install --list-missing + #dh_installdocs + #dh_installexamples + #dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure