mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
RPM building, is working at least
This commit is contained in:
@@ -1,8 +1,31 @@
|
||||
#!/bin/bash
|
||||
tar="@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.xz"
|
||||
arch=`uname -m`
|
||||
if [ -z "$arch" ]; then
|
||||
echo Sorry, cannot identify architecture
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
dist=`cat /etc/os-release | grep "^ID=" | cut -d \" -f 2`
|
||||
else
|
||||
dist=""
|
||||
fi
|
||||
|
||||
if [ -z "$dist" ]; then
|
||||
echo Sorry, cannot identify Linux distro
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Making RPM for $dist"
|
||||
|
||||
dir="release/linux-$dist"
|
||||
mkdir -p "$dir" || exit 1
|
||||
|
||||
tar="../@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.xz"
|
||||
|
||||
tar -cvJf "$tar" --exclude=\*.git --exclude=\*.tar.xz --exclude=\*.a --exclude=\*.la --exclude=\*.Po --exclude=\*.o -C .. dosbox-x || exit 1
|
||||
cp -vf "$tar" ~/rpmbuild/SOURCES/ || exit 1
|
||||
rpmbuild -ba dosbox-x.spec || exit 1
|
||||
rpmbuild -bb dosbox-x.spec || exit 1
|
||||
rm -v "$tar" || exit 1
|
||||
cp -v ~/rpmbuild/RPMS/$arch/*.rpm "$dir/" || exit 1
|
||||
|
||||
|
Reference in New Issue
Block a user