summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiu Wenbo2020-09-22 17:06:26 +0800
committerQiu Wenbo2020-09-22 17:06:26 +0800
commit43d4e8bd1682729992452e47b08730fe639d1d1c (patch)
tree43012c31fa753d49869ab00c2f1717be2b923f73
downloadaur-43d4e8bd1682729992452e47b08730fe639d1d1c.tar.gz
init version
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD35
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7da89fe83f84
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = libselinux-static
+ pkgdesc = SELinux library (static version)
+ pkgver = 3.1
+ pkgrel = 1
+ url = https://github.com/SELinuxProject/selinux
+ arch = x86_64
+ groups = selinux
+ license = custom
+ makedepends = pkgconf
+ depends = libsepol>=3.1
+ depends = pcre-static
+ options = staticlibs
+ source = https://github.com/SELinuxProject/selinux/releases/download/20200710/libselinux-3.1.tar.gz
+ sha256sums = ea5dcbb4d859e3f999c26a13c630da2f16dff9462e3cc8cb7b458ac157d112e7
+
+pkgname = libselinux-static
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1d651063a113
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: crab2313 <crab2313@gmail.com>
+
+pkgname=libselinux-static
+_pkgname=${pkgname%-static}
+pkgver=3.1
+pkgrel=1
+pkgdesc="SELinux library (static version)"
+arch=('x86_64')
+url='https://github.com/SELinuxProject/selinux'
+license=('custom')
+groups=('selinux')
+makedepends=('pkgconf')
+depends=('libsepol>=3.1' 'pcre-static')
+options=(staticlibs)
+source=("https://github.com/SELinuxProject/selinux/releases/download/20200710/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('ea5dcbb4d859e3f999c26a13c630da2f16dff9462e3cc8cb7b458ac157d112e7')
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+
+ # Do not build deprecated rpm_execcon() interface. It is useless on Arch Linux anyway.
+ export DISABLE_RPM=y
+
+ export CFLAGS="${CFLAGS} -fno-semantic-interposition"
+ make -C src libselinux.a
+}
+
+package() {
+ cd "${_pkgname}-${pkgver}"
+ mkdir -p "${pkgdir}/usr/lib"
+ export DISABLE_RPM=y
+
+ install -Dm 0755 src/libselinux.a ${pkgdir}/usr/lib/
+}
+