pulsar/script/mkrpm

26 lines
531 B
Plaintext
Raw Normal View History

#!/bin/bash
2014-10-16 03:31:13 +04:00
set -e
APP_NAME="$1"
APP_FILE_NAME="$2"
SPEC_FILE="$3"
DESKTOP_FILE="$4"
BUILD_DIRECTORY="$5"
2014-10-16 03:42:19 +04:00
RPM_BUILD_ROOT=~/rpmbuild
ARCH=`uname -m`
rpmdev-setuptree
cp -r "$BUILD_DIRECTORY/$APP_NAME" "$RPM_BUILD_ROOT/BUILD"
cp -r "$BUILD_DIRECTORY/icons" "$RPM_BUILD_ROOT/BUILD"
cp "$SPEC_FILE" "$RPM_BUILD_ROOT/SPECS"
cp ./atom.sh "$RPM_BUILD_ROOT/BUILD"
cp "$DESKTOP_FILE" "$RPM_BUILD_ROOT/BUILD"
rpmbuild -ba "$SPEC_FILE"
cp $RPM_BUILD_ROOT/RPMS/$ARCH/$APP_FILE_NAME-*.rpm "$BUILD_DIRECTORY/rpm"
rm -rf "$RPM_BUILD_ROOT"