From: cajus Date: Fri, 4 Apr 2008 16:04:46 +0000 (+0000) Subject: Added initial (hard coded) version of dh-make-gosa. Need X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=720b6708952721a3ee8a7f517e5fc82014ffe5c6;p=gosa.git Added initial (hard coded) version of dh-make-gosa. Need to beautify things... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10215 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/dh-make-gosa b/gosa-core/dh-make-gosa new file mode 100755 index 000000000..ab439a6cd --- /dev/null +++ b/gosa-core/dh-make-gosa @@ -0,0 +1,94 @@ +#!/bin/sh + +# Preset for now +plugin=fai +version=1.0 + +[ -d gosa-plugin-${plugin}-${version} ] && rm -rf gosa-plugin-${plugin}-${version} +cp -a fai gosa-plugin-${plugin}-${version} + +pushd . &> /dev/null + +cd gosa-plugin-${plugin}-${version} + +# Use gosa-plugin skelleton +echo "Calling dh_make..." +echo | dh_make -e cajus@debian.org -c gpl -s -n -f gosa-plugin-${plugin}-${version}.tar.gz &> /dev/null +if [[ $? -ne 0 ]]; then + echo "Failed to call dh_make - aborting!" + exit 1 +fi + +echo "Apdapting debian descriptive files..." +# Generate install file +for dir in admin personal addons; do + [ -d $dir ] && echo -e "$dir\t\t\t/usr/share/gosa/plugins" > debian/install +done +for dir in help/*; do + echo -e "$dir\t\t\t/usr/share/gosa/plugins/$plugin" >> debian/install +done +for dir in $(ls -1 locale | grep -v "^en$" | grep -v "^messages.po$"); do + echo -e "locale/$dir\t\t\t/usr/share/gosa/locale/plugins/$plugin" >> debian/install +done + +# Generate dirs +echo "usr/share/gosa" > debian/dirs + +# Adapt control +sed -i 's/^Section: unknown/Section: web/g' debian/control +sed -i 's/^Depends: .*$/Depends: gosa/g' debian/control +sed -i "s/^Description: .*$/Description: $plugin plugin for GOsa/g" debian/control +sed -i "s/^ <.*$/ This package includes the GOsa $plugin plugin.\ + .\ + GOsa is a combination of system-administrator and end-user web\ + interface, designed to handle LDAP based setups.\ +/g" debian/control + +# Adapt README.debian +cat < debian/README.Debian +README.Debian for GOsa $package plugin $version +------------------------------------------- + +Please read the main GOsa README.Debian file for more information. + +---- +Cajus Pollmeier Fri 02 Jun 2006 16:23:50 +0200 +EOF + +# Fix rules +sed -i "/MAKE/d" debian/rules +sed -i "s/#.*dh_install$/\tdh_install/" debian/rules + +# Adapt postinst/postrm +for file in postinst postrm; do +sed 's!#DEBHELPER#!#DEBHELPER#\ +\ +# Get apache versions running\ +servers=""\ +for srv in apache apache-ssl apache2; do\ + if [ -x /usr/sbin/$srv ]; then\ + servers="$srv $servers"\ + fi\ +done\ +\ +# Update gosa\ +/usr/sbin/update-gosa\ +\ +# Finally restart servers\ +for server in $servers; do\ + if [ -x /usr/sbin/invoke-rc.d ]; then\ + invoke-rc.d $server restart\ + else\ + /etc/init.d/$server restart\ + fi\ +done\ +\ +!' debian/$file.ex > debian/$file +done + +# Remove examples +rm debian/*ex debian/*EX &> /dev/null + +popd &> /dev/null + +echo "Done."