mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
822da1c0de
Summary: Now builds RPM on Travis Test Plan: manual Reviewers: juan, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2391
29 lines
684 B
Bash
Executable file
29 lines
684 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
SPEC_FILE="$1"
|
|
DESKTOP_FILE="$2"
|
|
BUILD_DIRECTORY="$3"
|
|
CONTENTS_DIR="$4"
|
|
APP_FILE_NAME="$5"
|
|
|
|
RPM_BUILD_ROOT=~/rpmbuild
|
|
ARCH=`uname -m`
|
|
|
|
# rpmdev-setuptree
|
|
mkdir -p $RPM_BUILD_ROOT/BUILD
|
|
mkdir -p $RPM_BUILD_ROOT/SPECS
|
|
mkdir -p $RPM_BUILD_ROOT/RPMS
|
|
|
|
cp -r "$CONTENTS_DIR/"* "$RPM_BUILD_ROOT/BUILD"
|
|
cp -r "$BUILD_DIRECTORY/icons" "$RPM_BUILD_ROOT/BUILD"
|
|
cp "$SPEC_FILE" "$RPM_BUILD_ROOT/SPECS"
|
|
cp ./N1.sh "$RPM_BUILD_ROOT/BUILD"
|
|
cp "$RPM_BUILD_ROOT/BUILD/N1.sh" "$RPM_BUILD_ROOT/BUILD/$APP_FILE_NAME"
|
|
cp "$DESKTOP_FILE" "$RPM_BUILD_ROOT/BUILD"
|
|
|
|
rpmbuild -ba "$SPEC_FILE"
|
|
cp $RPM_BUILD_ROOT/RPMS/$ARCH/$APP_FILE_NAME-*.rpm "$BUILD_DIRECTORY"
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|