summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 12 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ccf5cbab01d..ca7daa820a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,14 +6,14 @@
pkgname=libselinux
pkgver=2.3
-pkgrel=2
+pkgrel=3
pkgdesc="SELinux library and simple utilities"
arch=('i686' 'x86_64' 'armv6h')
url='http://userspace.selinuxproject.org'
license=('GPL')
groups=('selinux')
-makedepends=('python2' 'python' 'ruby' 'xz' 'pcre' 'swig')
-depends=('libsepol')
+makedepends=('python2' 'python' 'ruby' 'xz' 'swig')
+depends=('libsepol' 'pcre')
optdepends=('python2: python2 bindings'
'python: python bindings'
'ruby: ruby bindings')
@@ -21,17 +21,13 @@ conflicts=("selinux-usr-${pkgname}")
provides=("selinux-usr-${pkgname}=${pkgver}-${pkgrel}")
options=(!emptydirs)
source=("https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/${pkgname}-${pkgver}.tar.gz"
- "http://pkgs.fedoraproject.org/cgit/libselinux.git/plain/selinuxdefcon.8"
- "http://pkgs.fedoraproject.org/cgit/libselinux.git/plain/selinuxconlist.8"
"libselinux.tmpfiles.d")
sha256sums=('0b1e0b43ecd84a812713d09564019b08e7c205d89072b5cbcd07b052cd8e77b2'
- 'ddfbbc31f2eb107b12d2c949612b997ff7dc86aff78019493b0a3a894ff65e29'
- 'df5e0b3258df0953242b19bf1712e0c9bee53badfcab9a91071c915d3edd2098'
'afe23890fb2e12e6756e5d81bad3c3da33f38a95d072731c0422fbeb0b1fa1fc')
prepare() {
cd "${pkgname}-${pkgver}"
- sed -i 's|pkg-config --cflags ruby|pkg-config --cflags ruby-2.1|' src/Makefile
+ sed -i 's|pkg-config --cflags ruby|pkg-config --cflags ruby-$(RUBYLIBVER)|' src/Makefile
sed -i 's|site_ruby|vendor_ruby|' src/Makefile
}
@@ -46,27 +42,17 @@ build() {
package(){
cd "${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python2 install-pywrap
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python3 install-pywrap
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install-rubywrap
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python2 install-pywrap
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python3 install-pywrap
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install-rubywrap
install -Dm 0644 "${srcdir}"/libselinux.tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/libselinux.conf
- install -dm 0755 "${pkgdir}"/usr/share/man/man8/
- install -m 0644 "${srcdir}"/selinux{defcon,conlist}.8 "${pkgdir}"/usr/share/man/man8/
- # Rename those to match Fedora's names
- cd "${pkgdir}"/usr/sbin/
- mv getdefaultcon selinuxdefcon
- mv getconlist selinuxconlist
-
- # Those are removed in Fedora
- cd "${pkgdir}"/usr/sbin/
- rm compute_* getfilecon getpidcon policyvers setfilecon togglesebool \
- selinux_check_securetty_context
- rm "${pkgdir}"/usr/share/man/man8/togglesebool.8
-
- # /usr/lib/libselinux.so fix
+ # /usr/lib/libselinux.so is installed as a symlink to ../../lib/libselinux.so.1 instead of directly libselinux.so.1
+ # This issue will be fixed in libselinux 2.4
+ # (patch: https://github.com/SELinuxProject/selinux/commit/71393a181d63c9baae5fe8dcaeb9411d1f253998)
+ # For now, fix the symlink by hand.
cd "${pkgdir}"/usr/lib
rm libselinux.so
ln -s libselinux.so.1 libselinux.so