LDAPAccountManager/lam-packaging/buildPackages

144 lines
4.7 KiB
Plaintext
Raw Normal View History

2006-01-20 16:40:30 +00:00
#!/bin/bash
#
# Builds LDAP Account Manager packages from CVS.
if [ $# -lt 1 ]
then
echo -e "Usage: buildPackage <CVS tag>"
exit
fi
cd /daten/projekte/lam/pakete
export CVS_TAG=$1
2006-05-14 12:02:12 +00:00
cvs -z3 -d:ext:gruberroland@lam.cvs.sourceforge.net:/cvsroot/lam export -r $CVS_TAG lam
cvs -z3 -d:ext:gruberroland@lam.cvs.sourceforge.net:/cvsroot/lam export -r $CVS_TAG lam-packaging
2007-11-06 17:27:11 +00:00
cvs -d/daten/projekte/CVSROOT export -r $CVS_TAG lamPro
2006-01-20 16:40:30 +00:00
cp lam-packaging/getVersion ./
export VERSION=`./getVersion`
# remove files which are not in the final release
rm -r lam/po
rm -r lam/tests
2007-11-06 17:27:11 +00:00
find . -name .cvsignore -exec rm {} \;
2006-01-20 16:40:30 +00:00
mv lam ldap-account-manager-$VERSION
2007-11-22 19:58:42 +00:00
# create LAM Pro documentation
cd lamPro/docs/LAMProHowTo-sources
./make.sh
cd ../../..
rm -r lamPro/docs/LAMProHowTo-sources
2007-01-14 18:43:19 +00:00
# create LAM Pro build directory
2006-07-30 13:36:18 +00:00
mkdir LAMPro
2008-02-04 22:23:51 +00:00
cp -a ldap-account-manager-$VERSION LAMPro/ldap-account-manager-$VERSION
2007-11-06 17:27:11 +00:00
cp -a lamPro/* LAMPro/ldap-account-manager-$VERSION
rm -r lamPro
2006-07-30 13:36:18 +00:00
2008-02-04 22:23:51 +00:00
# create PHPdoc
cd LAMPro/ldap-account-manager-$VERSION
./phpdoc.sh
rm phpdoc.sh
cd ../..
cd ldap-account-manager-$VERSION
./phpdoc.sh
rm phpdoc.sh
cd ..
2006-01-20 16:40:30 +00:00
# tar.gz
2006-03-09 19:07:46 +00:00
cp lam-packaging/autoconf/configure.ac ldap-account-manager-$VERSION/
cp lam-packaging/autoconf/Makefile.in ldap-account-manager-$VERSION/
cd ldap-account-manager-$VERSION
touch install.sh
perl -pi -e "s/\\@\\@VERSION\\@\\@/$VERSION/g" configure.ac
2006-03-09 19:07:46 +00:00
autoconf
rm configure.ac
rm -r autom4te.cache
2006-03-09 19:07:46 +00:00
cd ..
2006-07-30 13:36:18 +00:00
tar cfz ldap-account-manager-$VERSION.tar.gz ldap-account-manager-$VERSION
# tar.gz of LAM Pro
cd LAMPro
cp ../lam-packaging/autoconf/configure.ac ldap-account-manager-$VERSION/
cp ../lam-packaging/autoconf/Makefile.in ldap-account-manager-$VERSION/
cd ldap-account-manager-$VERSION
touch install.sh
perl -pi -e "s/\\@\\@VERSION\\@\\@/$VERSION/g" configure.ac
autoconf
rm configure.ac
rm -r autom4te.cache
cd ..
tar cfz ldap-account-manager-$VERSION.tar.gz ldap-account-manager-$VERSION
cd ..
2006-01-20 16:40:30 +00:00
# Debian
mkdir Debian
cp ldap-account-manager-$VERSION.tar.gz Debian/ldap-account-manager_$VERSION.orig.tar.gz
mv ldap-account-manager-$VERSION Debian/
cp -r lam-packaging/debian Debian/ldap-account-manager-$VERSION/
cd Debian/ldap-account-manager-$VERSION
debuild
cd ..
rm -r ldap-account-manager-$VERSION
cd ..
2006-07-30 13:36:18 +00:00
# Debian for LAM Pro
cd LAMPro
mkdir Debian
cp ldap-account-manager-$VERSION.tar.gz Debian/ldap-account-manager_$VERSION.orig.tar.gz
mv ldap-account-manager-$VERSION Debian/
cp -r ../lam-packaging/debian Debian/ldap-account-manager-$VERSION/
cd Debian/ldap-account-manager-$VERSION
debuild
cd ..
rm -r ldap-account-manager-$VERSION
cd ..
cd ..
2006-01-20 16:40:30 +00:00
# RPM
perl -pi -e "s/\\@\\@VERSION\\@\\@/$VERSION/g" lam-packaging/RPM/ldap-account-manager.spec
2008-07-29 18:29:24 +00:00
cp lam-packaging/RPM/ldap-account-manager.spec lam-packaging/RPM/ldap-account-manager-fedora.spec
2008-08-03 18:03:48 +00:00
perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/fedora/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@USER\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@GROUP\\@\\@/apache/g" lam-packaging/RPM/ldap-account-manager-fedora.spec
perl -pi -e "s/\\@\\@HTTP_DIR\\@\\@/\\/var\\/www\\/html/g" lam-packaging/RPM/ldap-account-manager-suse.spec
2008-07-29 18:29:24 +00:00
cp lam-packaging/RPM/ldap-account-manager.spec lam-packaging/RPM/ldap-account-manager-suse.spec
2008-08-03 18:03:48 +00:00
perl -pi -e "s/\\@\\@DISTRIBUTION\\@\\@/suse/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@USER\\@\\@/wwwrun/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@GROUP\\@\\@/www/g" lam-packaging/RPM/ldap-account-manager-suse.spec
perl -pi -e "s/\\@\\@HTTP_DIR\\@\\@/\\/srv\\/www\\/htdocs/g" lam-packaging/RPM/ldap-account-manager-suse.spec
2008-07-29 18:43:22 +00:00
mkdir RPM
mkdir LAMPro/RPM
2008-07-29 18:29:24 +00:00
# Fedora RPM
cp ldap-account-manager-$VERSION.tar.gz /usr/src/rpm/SOURCES
2008-07-29 18:43:22 +00:00
rpmbuild --sign --clean --rmsource -bb lam-packaging/RPM/ldap-account-manager-fedora.spec
mv /usr/src/rpm/RPMS/noarch/ldap-account-manager*-$VERSION-1*.noarch.rpm RPM/
2008-07-29 18:29:24 +00:00
# Fedora RPM for LAM Pro
cd LAMPro
cp ldap-account-manager-$VERSION.tar.gz /usr/src/rpm/SOURCES/ldap-account-manager-$VERSION.tar.gz
2008-07-29 18:43:22 +00:00
rpmbuild --sign --clean --rmsource -bb ../lam-packaging/RPM/ldap-account-manager-fedora.spec
mv /usr/src/rpm/RPMS/noarch/ldap-account-manager*-$VERSION-1*.noarch.rpm RPM/
2008-07-29 18:29:24 +00:00
cd ..
# Suse RPM
2006-01-20 16:40:30 +00:00
cp ldap-account-manager-$VERSION.tar.gz /usr/src/rpm/SOURCES
2008-07-29 18:43:22 +00:00
rpmbuild --sign --clean --rmsource -bb lam-packaging/RPM/ldap-account-manager-suse.spec
mv /usr/src/rpm/RPMS/noarch/ldap-account-manager*-$VERSION-1*.noarch.rpm RPM/
2006-01-20 16:40:30 +00:00
2008-07-29 18:29:24 +00:00
# Suse RPM for LAM Pro
2006-07-30 13:36:18 +00:00
cd LAMPro
cp ldap-account-manager-$VERSION.tar.gz /usr/src/rpm/SOURCES/ldap-account-manager-$VERSION.tar.gz
2008-07-29 18:43:22 +00:00
rpmbuild --sign --clean --rmsource -bb ../lam-packaging/RPM/ldap-account-manager-suse.spec
mv /usr/src/rpm/RPMS/noarch/ldap-account-manager*-$VERSION-1*.noarch.rpm RPM/
2006-07-30 13:36:18 +00:00
cd ..
2006-01-20 16:40:30 +00:00
# clean up
rm -r lam-packaging
rm getVersion
rm buildPackages