X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fdebian%2Frules;h=407e746c06e2812dc85e51a47cfad20e60464acb;hb=f8e59742185efb30bb2d7d5d4ad3c464ac7a8e38;hp=40b91dee7413f831642a10e8680b2b65479d944e;hpb=3f0a6f0213afbe80e4959727ec96b5f5136cb78d;p=gosa.git diff --git a/gosa-core/debian/rules b/gosa-core/debian/rules index 40b91dee7..407e746c0 100755 --- a/gosa-core/debian/rules +++ b/gosa-core/debian/rules @@ -1,168 +1,77 @@ #!/usr/bin/make -f +# -*- makefile -*- +# debian/rules file to build GOsa packages. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# Configure smarty location -export SMARTY_LOCATION=$(dpkg -L smarty | grep Smarty.class.php) +# This has to be exported to make some magic below work. +export DH_OPTIONS -build: patch - #************************************************* - #* Building GOsa into a Debian/GNU Linux Package * - #* please stand by * - #************************************************* +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: patch build-indep + #************************************************* + #* Building GOsa into a Debian/GNU Linux Package * + #* please stand by * + #************************************************* + +build-indep: build-indep-stamp +build-indep-stamp: configure-stamp + touch $@ clean: clean-patched unpatch clean-patched: dh_testdir - rm -f install-stamp - -rm -f debian/files - -rm -f debian/substvars + dh_testroot + rm -f build-indep-stamp configure-stamp + dh_clean unpatch: dpatch deapply-all rm -rf patch-stamp debian/patched -install: install-stamp -install-stamp: +install: install-indep +install-indep: dh_testdir dh_testroot - dh_clean -k - dh_installdirs - - # Move everything but debian to the destination directory - for i in `ls | grep -v debian`; do \ - cp -R $$i debian/gosa/usr/share/gosa ; \ - done - - # Clean up with SVN directories - -find debian/gosa -type d -name ".svn" -exec rm -rf {} \; &> /dev/null || /bin/true - - # Move schema files to the schema package - -mv debian/gosa/usr/share/gosa/contrib/openldap/go*.schema debian/gosa-schema/etc/ldap/schema - - # Install changelogs - -for package in gosa gosa-schema gosa-desktop gosa-help-de gosa-help-en gosa-help-fr gosa-help-nl smarty-render; do \ - [[ ! -d debian/$package/usr/share/doc/$package ]] && mkdir -p debian/$package/usr/share/doc/$package ; \ - gzip -c9 debian/changelog > debian/$package/usr/share/doc/$package/changelog.Debian.gz ; \ - done - - # Move contrib to doc - -mv -R debian/gosa/usr/share/gosa/contrib debian/gosa/usr/share/doc/gosa/ - - # Put docs in shape - -cp -R INSTALL debian/gosa/usr/share/doc/gosa/README.INSTALL - -cp AUTHORS README FAQ doc/README.pptp doc/README.xls-export doc/README.glpi doc/README.nagios doc/README.phpscheduleit doc/README.safemode doc/README.devel doc/README.openxchange debian/gosa/usr/share/doc/gosa/ - - # Remove docs that are located in the wrong location - -rm debian/gosa/usr/share/gosa/doc/README.ssh - -for doc in README INSTALL AUTHORS Changelog COPYING TODO FAQ; do \ - rm debian/gosa/usr/share/gosa/$doc ; \ - done - - # Create missing directories - -for dir in compile config cache; do \ - mkdir -p debian/gosa/var/spool/gosa/dir ; \ - done - -mkdir -p debian/gosa/etc/gosa/vacation - -mkdir -p debian/gosa/usr/lib/gosa - -mkdir -p debian/smarty-render/usr/share/php/smarty/libs/plugins - - # Feed etc directory - -cp -R debian/apache.conf debian/gosa/etc/gosa/apache.conf - -cp -R contrib/encodings debian/gosa/etc/gosa/encodings - -cp -R plugins/personal/mail/sieve-*.txt debian/gosa/etc/gosa - -cp contrib/shells debian/gosa/etc/gosa - - # Install binaries - -mv debian/gosa/usr/share/gosa/bin/* debian/gosa/usr/bin - -mkdir debian/gosa/usr/sbin - -mv debian/gosa/usr/share/gosa/update-gosa debian/gosa/usr/sbin - - # Install documentation - -for lang in en de fr nl; do mkdir -p debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang; done - -for lang in en de fr nl; do mv debian/gosa/usr/share/gosa/doc/guide/user/$$lang/* debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang/; done - - # Create gosa-desktop package - -cp -R contrib/scripts/desktoprc debian/gosa-desktop/etc/gosa/desktoprc - -cp -R contrib/scripts/gosa debian/gosa-desktop/usr/bin/gosa - -cp -R debian/gosa*.xpm debian/gosa-desktop/usr/share/pixmaps - -cp -R debian/gosa-desktop.desktop debian/gosa-desktop/usr/share/applications/gosa.desktop - - # Clean up - -rm -rf debian/gosa/usr/share/gosa/contrib - -rm -rf debian/gosa/usr/share/gosa/state - -rm -rf debian/gosa/usr/share/gosa/locale/en - -rm -rf debian/gosa/usr/share/gosa/update-locale - -rm -rf debian/gosa/usr/share/gosa/update-pdf-help - -rm -rf debian/gosa/usr/share/gosa/patch-stamp - -rm -rf debian/gosa/usr/share/gosa/update-online-help - -rm -rf debian/gosa/usr/share/gosa/bin - -rm -rf debian/gosa/usr/share/gosa/doc/guide/user/*/lyx-source - -rm -rf debian/gosa/usr/share/gosa/doc/guide/admin - -rm -rf debian/gosa/usr/share/gosa/doc/guide/devel - -rm -rf debian/gosa/usr/share/doc/gosa/guide* - -rm -rf debian/gosa/usr/share/doc/gosa/marketing + dh_clean -k -i + dh_installdirs -i + dh_install -i --exclude COPYING - # Configure smarty location - hey ubuntu's please change SMARTY_LOCATION up there - sed -i 's%"CONFIG_TEMPLATE_DIR", "../contrib/"%"CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa/contrib/"%g' debian/gosa/usr/share/gosa/include/functions.inc - cp include/smarty/plugins/block.render.php debian/smarty-render/usr/share/php/smarty/libs/plugins - rm -rf debian/gosa/usr/share/gosa/include/smarty; \ - sed -i "s%require(\"smarty/Smarty.class.php\");%require(\"${SMARTY_LOCATION}\");%g" debian/gosa/usr/share/gosa/include/php_setup.inc - - # Configure update location - sed -i 's%^define.*__FILE__.*%define ("GOSA_HOME", "/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa - sed -i 's%GOSA_HOME.*include/class_location.inc%"/etc/gosa/classes%g' debian/gosa/usr/sbin/update-gosa - sed -i 's%class_mapping= get_classes();%class_mapping= get_classes("/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa - sed -i 's%class_location.inc%/etc/gosa/classes%g' debian/gosa/usr/share/gosa/include/functions.inc - - # Fix permissions - -find debian/gosa -type f -exec chmod -x {} \; &> /dev/null - -find debian/smarty-render -type f -exec chmod -x {} \; &> /dev/null - -chmod +x debian/gosa/usr/bin/mkntpasswd - - # Install lintian/linda overrides - install -D -m 644 debian/overrides-lintian debian/gosa/usr/share/lintian/overrides/gosa - install -D -m 644 debian/overrides-linda debian/gosa/usr/share/linda/overrides/gosa - - touch install-stamp - -patch: patch-stamp -patch-stamp: - dpatch apply-all - dpatch cat-all >patch-stamp - -binary-indep: install +binary-common: dh_testdir dh_testroot - dh_installdocs - dh_installcron + dh_installchangelogs Changelog + dh_installdocs dh_installexamples - dh_installdebconf dh_installmenu - dh_installman --package=gosa debian/mkntpasswd.1 - dh_installman --package=gosa-desktop debian/gosa.1 - dh_link + dh_installdebconf + dh_installman -pgosa-desktop contrib/gosa.1 dh_strip - dh_compress --exclude=gosa.conf - dh_fixperms - dh_perl + dh_compress + dh_fixperms dh_installdeb - dh_shlibdeps - - cd debian/gosa && find ./etc -type f -print | sed -e 's#^./#/#' > DEBIAN/conffiles - chmod 644 debian/gosa/DEBIAN/conffiles - dh_gencontrol dh_md5sums dh_builddeb -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - -binary: binary-indep -.PHONY: build install clean binary-indep binary +patch: patch-stamp +patch-stamp: + dpatch apply-all + dpatch cat-all >patch-stamp -binary-arch: +binary-indep: build-indep install-indep + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common +binary: binary-indep +.PHONY: build clean binary-indep binary install install-indep configure