openuds/client/linux/build-packages.sh

37 lines
977 B
Bash
Raw Normal View History

2015-04-10 15:46:15 +02:00
#!/bin/bash
VERSION=`cat ../../VERSION`
2015-04-10 15:46:15 +02:00
RELEASE=1
2015-04-20 07:33:01 +02:00
# Debian based
dpkg-buildpackage -b
2015-04-10 15:46:15 +02:00
2015-04-20 07:33:01 +02:00
# Now rpm based
2015-04-10 15:46:15 +02:00
top=`pwd`
cat udsclient-template.spec |
2015-04-26 03:18:15 +02:00
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
2015-04-10 15:46:15 +02:00
sed -e s/"release 1"/"release ${RELEASE}"/g > udsclient-$VERSION.spec
# Now fix dependencies for opensuse
cat udsclient-template.spec |
2015-04-26 03:18:15 +02:00
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
2015-04-10 15:46:15 +02:00
sed -e s/"name udsclient"/"name udsclient-opensuse"/g |
sed -e s/"PyQt4"/"python-qt4"/g |
sed -e s/"libXScrnSaver"/"libXss1"/g > udsclient-opensuse-$VERSION.spec
2015-04-23 06:32:03 +02:00
# Right now, udsactor-xrdp-.spec is not needed
2015-04-10 15:46:15 +02:00
for pkg in udsclient-$VERSION.spec udsclient-opensuse-$VERSION.spec; do
rm -rf rpm
for folder in SOURCES BUILD RPMS SPECS SRPMS; do
mkdir -p rpm/$folder
done
rpmbuild -v -bb --clean --buildroot=$top/rpm/BUILD/$pkg-root --target noarch $pkg 2>&1
done
#rm udsclient-$VERSION
2015-04-20 09:24:15 +02:00
make DESTDIR=targz DISTRO=targz VERSION=${VERSION} install