about summary refs log tree commit diff
path: root/third_party/glog/packages/rpm.sh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-02-07T19·15+0300
committertazjin <tazjin@tvl.su>2022-02-07T22·25+0000
commit5ed7ef8089a6914a81b7592d2b6db93c5d87a1e2 (patch)
treed1b86294fd613ed62f131a4ba67bc6e3adf2fc61 /third_party/glog/packages/rpm.sh
parent18c8c41b5c2de5a08530b5185cefef86f6ffaff5 (diff)
chore(3p/glog): Unvendor glog r/3784
... and build //third_party/nix with the one from nixpkgs.

Change-Id: Iae7f1772a31286f2c22955cdc1fe61ee82d112aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3016
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'third_party/glog/packages/rpm.sh')
-rwxr-xr-xthird_party/glog/packages/rpm.sh75
1 files changed, 0 insertions, 75 deletions
diff --git a/third_party/glog/packages/rpm.sh b/third_party/glog/packages/rpm.sh
deleted file mode 100755
index e5649a22581b..000000000000
--- a/third_party/glog/packages/rpm.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh -e
-
-# Run this from the 'packages' directory, just under rootdir
-
-# We can only build rpm packages, if the rpm build tools are installed
-if [ \! -x /usr/bin/rpmbuild ]
-then
-  echo "Cannot find /usr/bin/rpmbuild. Not building an rpm." 1>&2
-  exit 0
-fi
-
-# Check the commandline flags
-PACKAGE="$1"
-VERSION="$2"
-fullname="${PACKAGE}-${VERSION}"
-archive=../$fullname.tar.gz
-
-if [ -z "$1" -o -z "$2" ]
-then
-  echo "Usage: $0 <package name> <package version>" 1>&2
-  exit 0
-fi
-
-# Double-check we're in the packages directory, just under rootdir
-if [ \! -r ../Makefile -a \! -r ../INSTALL ]
-then
-  echo "Must run $0 in the 'packages' directory, under the root directory." 1>&2
-  echo "Also, you must run \"make dist\" before running this script." 1>&2
-  exit 0
-fi
-
-if [ \! -r "$archive" ]
-then
-  echo "Cannot find $archive. Run \"make dist\" first." 1>&2
-  exit 0
-fi
-
-# Create the directory where the input lives, and where the output should live
-RPM_SOURCE_DIR="/tmp/rpmsource-$fullname"
-RPM_BUILD_DIR="/tmp/rpmbuild-$fullname"
-
-trap 'rm -rf $RPM_SOURCE_DIR $RPM_BUILD_DIR; exit $?' EXIT SIGHUP SIGINT SIGTERM
-
-rm -rf "$RPM_SOURCE_DIR" "$RPM_BUILD_DIR"
-mkdir "$RPM_SOURCE_DIR"
-mkdir "$RPM_BUILD_DIR"
-
-cp "$archive" "$RPM_SOURCE_DIR"/v"$VERSION".tar.gz
-
-rpmbuild -bb rpm/rpm.spec \
-  --define "NAME $PACKAGE" \
-  --define "VERSION $VERSION" \
-  --define "_sourcedir $RPM_SOURCE_DIR" \
-  --define "_builddir $RPM_BUILD_DIR" \
-  --define "_rpmdir $RPM_SOURCE_DIR"
-
-# We put the output in a directory based on what system we've built for
-destdir=rpm-unknown
-if [ -r /etc/issue ]
-then
-   grep "Red Hat.*release 7" /etc/issue >/dev/null 2>&1 && destdir=rh7
-   grep "Red Hat.*release 8" /etc/issue >/dev/null 2>&1 && destdir=rh8
-   grep "Red Hat.*release 9" /etc/issue >/dev/null 2>&1 && destdir=rh9
-   if grep Fedora /etc/issue >/dev/null; then 
-	destdir=fc`grep Fedora /etc/issue | cut -d' ' -f 4`;
-   fi
-fi
-
-rm -rf "$destdir"
-mkdir -p "$destdir"
-# We want to get not only the main package but devel etc, hence the middle *
-mv "$RPM_SOURCE_DIR"/*/"${PACKAGE}"-*"${VERSION}"*.rpm "$destdir"
-
-echo
-echo "The rpm package file(s) are located in $PWD/$destdir"