Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to create rpm instead of deb packages
- Loading branch information
Andreas Gruenbacher
committed
Jan 8, 2019
1 parent
99b9317
commit 4e383be
Showing
25 changed files
with
152 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/lib/Auswertung.pm | ||
/debs | ||
/backend/package-lock.json | ||
/rpm | ||
/srpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /usr/bin/python | ||
#! /usr/bin/python2 | ||
|
||
import sys | ||
import getopt | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
#! /bin/sh | ||
|
||
set -e | ||
: ${PACKAGE:=trialinfo} | ||
|
||
REPO=debs | ||
set -e | ||
|
||
topdir=$PWD | ||
tag=$1 | ||
version=${tag#$PACKAGE-} | ||
|
||
tarball=$PACKAGE-$version.tar.gz | ||
version=${tag#$PACKAGE-} | ||
basename=$PACKAGE-$version | ||
deb=${PACKAGE}_${version}_all.deb | ||
|
||
curdir=$PWD | ||
|
||
tmpdir=$(mktemp -d) | ||
trap "rm -rf $tmpdir" EXIT | ||
|
||
tar -xz -C "$tmpdir" < "$tarball" | ||
cp -r debian "$tmpdir/$basename/" | ||
cd "$tmpdir/$basename" | ||
sed -i \ | ||
-e "s/@VERSION@/$version/g" \ | ||
-e "s/@DATE@/$(date -R)/g" \ | ||
"debian/changelog" | ||
sudo dpkg-buildpackage -us -uc -d | ||
cd .. | ||
sudo chown -R $(whoami) . | ||
mkdir -p "$curdir/$REPO" | ||
cat "$deb" > "$curdir/$REPO/$deb" | ||
mkdir "$tmpdir/$basename" | ||
git show "$tag:$PACKAGE.spec" > "$tmpdir/$PACKAGE.spec" | ||
git archive --prefix="$basename/" "$tag" | gzip -9 > "$tmpdir/$basename.tar.gz" | ||
make snapshot | gzip -9 > "$tmpdir/snapshot.tar.gz" | ||
|
||
cd "$tmpdir" | ||
rpmbuild -ba \ | ||
-D "_sourcedir $tmpdir" \ | ||
-D "_rpmdir $topdir/rpm" \ | ||
-D "_srcrpmdir $topdir/srpm" \ | ||
-D "VERSION $version" \ | ||
"$PACKAGE.spec" | ||
rpm --addsign \ | ||
-D "__gpg /usr/bin/gpg" \ | ||
-D "_gpg_name $GPG_NAME" \ | ||
$topdir/rpm/*/trialinfo-$version-*.rpm \ | ||
$topdir/srpm/trialinfo-$version-*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/RPM-GPG-KEY-trialinfo |
Oops, something went wrong.