Use debian naming conventions for .deb.
This commit is contained in:
@@ -6,7 +6,8 @@ if [ $# -ne "3" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=$1
|
TAG=$1
|
||||||
|
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||||
BUILTDIR=$2
|
BUILTDIR=$2
|
||||||
PACKAGEDIR=$3
|
PACKAGEDIR=$3
|
||||||
ROOTDIR=root
|
ROOTDIR=root
|
||||||
@@ -31,7 +32,7 @@ cp -r hicolor $ROOTDIR/usr/share/icons/
|
|||||||
(
|
(
|
||||||
echo "Building Debian package."
|
echo "Building Debian package."
|
||||||
cd deb
|
cd deb
|
||||||
./buildpackage.sh "$VERSION" ../$ROOTDIR "$PACKAGEDIR" &> package.log
|
./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Debian package build failed, refer to $PWD/package.log."
|
echo "Debian package build failed, refer to $PWD/package.log."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenRA packaging script for Debian based distributions
|
# OpenRA packaging script for Debian based distributions
|
||||||
|
|
||||||
E_BADARGS=85
|
E_BADARGS=85
|
||||||
if [ $# -ne "3" ]
|
if [ $# -ne "3" ]
|
||||||
then
|
then
|
||||||
echo "Usage: `basename $0` version root-dir outputdir"
|
echo "Usage: `basename $0` version root-dir outputdir"
|
||||||
exit $E_BADARGS
|
exit $E_BADARGS
|
||||||
fi
|
fi
|
||||||
VERSION=$1
|
|
||||||
|
VERSION=`echo $1 | sed "s/-/\\./g"`
|
||||||
|
|
||||||
rootdir=`readlink -f $2`
|
rootdir=`readlink -f $2`
|
||||||
PACKAGE_SIZE=`du --apparent-size -c $rootdir/usr | grep "total" | awk '{print $1}'`
|
PACKAGE_SIZE=`du --apparent-size -c $rootdir/usr | grep "total" | awk '{print $1}'`
|
||||||
|
|
||||||
@@ -26,7 +29,7 @@ pushd root
|
|||||||
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g' > DEBIAN/md5sums
|
md5sum `find . -type f | grep -v '^[.]/DEBIAN/'` | sed 's/\.\/usr\//usr\//g' > DEBIAN/md5sums
|
||||||
|
|
||||||
# Start building, the file should appear in the output directory
|
# Start building, the file should appear in the output directory
|
||||||
dpkg-deb -b . $3/openra-$VERSION.deb
|
dpkg-deb -b . $3/openra_${VERSION}_all.deb
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ fi
|
|||||||
SRCDIR=$(readlink -f $(dirname $0)/../)
|
SRCDIR=$(readlink -f $(dirname $0)/../)
|
||||||
BUILTDIR="${SRCDIR}/packaging/built"
|
BUILTDIR="${SRCDIR}/packaging/built"
|
||||||
TAG=$1
|
TAG=$1
|
||||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
|
||||||
OUTPUTDIR=$(readlink -f $2)
|
OUTPUTDIR=$(readlink -f $2)
|
||||||
|
|
||||||
# Build the code and push the files into a clean dir
|
# Build the code and push the files into a clean dir
|
||||||
@@ -75,7 +74,7 @@ echo "Creating packages..."
|
|||||||
|
|
||||||
(
|
(
|
||||||
cd linux
|
cd linux
|
||||||
sh buildpackage.sh "$VERSION" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
sh buildpackage.sh "$TAG" "$BUILTDIR" "$OUTPUTDIR" &> package.log
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "linux package build failed, refer to linux/package.log."
|
echo "linux package build failed, refer to linux/package.log."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -5,17 +5,15 @@ PKGDIR=$2
|
|||||||
|
|
||||||
TYPE=`echo $TAG | grep -o "^[a-z]\\+"`
|
TYPE=`echo $TAG | grep -o "^[a-z]\\+"`
|
||||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||||
FTPPATHBASE="openra.res0l.net"
|
LINUXVERSION=`echo $VERSION | sed "s/-/\\./g"`
|
||||||
|
|
||||||
|
FTPPATHBASE="openra.res0l.net"
|
||||||
FTPPATH="$FTPPATHBASE/assets/downloads"
|
FTPPATH="$FTPPATHBASE/assets/downloads"
|
||||||
|
|
||||||
./uploader.sh windows $PKGDIR/OpenRA-$TAG.exe "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
./uploader.sh windows $PKGDIR/OpenRA-$TAG.exe "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
||||||
./uploader.sh mac $PKGDIR/OpenRA-$TAG.zip "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
./uploader.sh mac $PKGDIR/OpenRA-$TAG.zip "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
||||||
|
./uploader.sh linux/deb $PKGDIR/openra_${LINUXVERSION}_all.deb "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
||||||
|
|
||||||
LINUXVERSION=`echo $VERSION | sed "s/-/\\./g"`
|
|
||||||
|
|
||||||
mv $PKGDIR/openra-$VERSION.deb $PKGDIR/openra-$TYPE$VERSION.deb
|
|
||||||
./uploader.sh linux/deb $PKGDIR/openra-$TYPE$VERSION.deb "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
|
||||||
mv $PKGDIR/openra-$LINUXVERSION-1.noarch.rpm $PKGDIR/openra-$TYPE$VERSION-1.noarch.rpm
|
mv $PKGDIR/openra-$LINUXVERSION-1.noarch.rpm $PKGDIR/openra-$TYPE$VERSION-1.noarch.rpm
|
||||||
./uploader.sh linux/rpm $PKGDIR/openra-$TYPE$VERSION-1.noarch.rpm "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
./uploader.sh linux/rpm $PKGDIR/openra-$TYPE$VERSION-1.noarch.rpm "$FTPSERVER" "$FTPPATH" "$3" "$4"
|
||||||
mv $PKGDIR/openra-$LINUXVERSION-1-any.pkg.tar.xz $PKGDIR/openra-$TYPE$VERSION-1-any.pkg.tar.xz
|
mv $PKGDIR/openra-$LINUXVERSION-1-any.pkg.tar.xz $PKGDIR/openra-$TYPE$VERSION-1-any.pkg.tar.xz
|
||||||
|
|||||||
Reference in New Issue
Block a user