mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
build(opensuse): improve opensuse build process.
This commit is contained in:
parent
233b1f2f0e
commit
158c6006b1
4
Makefile
4
Makefile
@ -26,7 +26,7 @@ full: build
|
||||
ROOT = $(shell find "${BUILD}/root" -type f -printf "%P\n")
|
||||
PROFILES = $(shell find "${BUILD}/apparmor.d" -type f -printf "%P\n")
|
||||
install:
|
||||
@install -Dm755 ${BUILD}/aa-log ${DESTDIR}/usr/bin/aa-log
|
||||
@install -Dm0755 ${BUILD}/aa-log ${DESTDIR}/usr/bin/aa-log
|
||||
@for file in ${ROOT}; do \
|
||||
install -Dm0644 "${BUILD}/root/$${file}" "${DESTDIR}/$${file}"; \
|
||||
done;
|
||||
@ -78,7 +78,7 @@ dpkg:
|
||||
|
||||
rpm:
|
||||
@bash dists/build.sh rpm
|
||||
@sudo rpm -i ${PKGNAME}-*.rpm
|
||||
@sudo rpm -ivh --force ${PKGNAME}-*.rpm
|
||||
|
||||
tests:
|
||||
@go test ./cmd/... -v -cover -coverprofile=coverage.out
|
||||
|
@ -8,7 +8,8 @@
|
||||
set -eu -o pipefail
|
||||
|
||||
readonly COMMAND="$1"
|
||||
readonly OUTPUT="${PKGDEST:-$PWD}"
|
||||
readonly OUTPUT="$PWD"
|
||||
readonly PKGDEST="${PKGDEST:-$PWD}"
|
||||
readonly PKGNAME=apparmor.d
|
||||
VERSION="0.$(git rev-list --count HEAD)"
|
||||
readonly VERSION
|
||||
@ -27,7 +28,7 @@ main() {
|
||||
;;
|
||||
|
||||
rpm)
|
||||
RPMBUILD_ROOT=$(mktemp -d)
|
||||
RPMBUILD_ROOT=$(mktemp -d /tmp/$PKGNAME.XXXXXX)
|
||||
ARCH=$(uname -m)
|
||||
readonly RPMBUILD_ROOT ARCH
|
||||
|
||||
@ -39,7 +40,7 @@ main() {
|
||||
sed -i "s/^Version:.*/Version: $VERSION/" "SPECS/$PKGNAME.spec"
|
||||
rpmbuild -bb --define "_topdir $RPMBUILD_ROOT" "SPECS/$PKGNAME.spec"
|
||||
|
||||
cp "$RPMBUILD_ROOT/RPMS/$ARCH/"*.rpm "$OUTPUT"
|
||||
mv "$RPMBUILD_ROOT/RPMS/$ARCH/"*.rpm "$OUTPUT"
|
||||
rm -rf "$RPMBUILD_ROOT"
|
||||
;;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user