]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - libselinux/libselinux.nm
Move all packages to root.
[people/ms/ipfire-3.x.git] / libselinux / libselinux.nm
diff --git a/libselinux/libselinux.nm b/libselinux/libselinux.nm
new file mode 100644 (file)
index 0000000..ebffd37
--- /dev/null
@@ -0,0 +1,94 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = libselinux
+version    = 2.0.96
+release    = 1
+
+groups     = System/Libraries
+url        = http://www.selinuxproject.org
+license    = Public Domain
+summary    = SELinux library and simple utilities.
+
+description
+       libselinux provides an API for SELinux applications to get and set \
+       process and file security contexts and to obtain security policy \
+       decisions.
+end
+
+source_dl  =
+sources    = %{thisapp}.tgz
+
+build
+       requires
+               libsepol-devel
+               python-devel
+               swig
+       end
+
+       build
+               make clean
+               make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g %{CFLAGS}" swigify
+               make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g %{CFLAGS}" all
+               make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g %{CFLAGS}" pywrap
+       end
+
+       install_cmds
+               make install-pywrap DESTDIR=%{BUILDROOT}
+
+               # Remove unwanted binaries
+               rm -f %{BUILDROOT}/usr/sbin/compute_*
+               rm -f %{BUILDROOT}/usr/sbin/deftype
+               rm -f %{BUILDROOT}/usr/sbin/execcon
+               rm -f %{BUILDROOT}/usr/sbin/getenforcemode
+               rm -f %{BUILDROOT}/usr/sbin/getfilecon
+               rm -f %{BUILDROOT}/usr/sbin/getpidcon
+               rm -f %{BUILDROOT}/usr/sbin/mkdircon
+               rm -f %{BUILDROOT}/usr/sbin/policyvers
+               rm -f %{BUILDROOT}/usr/sbin/setfilecon
+               rm -f %{BUILDROOT}/usr/sbin/selinuxconfig
+               rm -f %{BUILDROOT}/usr/sbin/selinuxdisable
+               rm -f %{BUILDROOT}/usr/sbin/getseuser
+               rm -f %{BUILDROOT}/usr/sbin/selinux_check_securetty_context
+
+               # Move binaries from /sbin to /usr/sbin
+               mv %{BUILDROOT}/sbin/* %{BUILDROOT}/usr/sbin
+
+               # Remove python module
+               rm -rvf %{BUILDROOT}/usr/lib/python*
+       end
+end
+
+packages
+       package %{name}
+       end
+       
+       package %{name}-devel
+               template DEVEL
+       end
+       
+       package %{name}-utils
+               summary = SELinux libselinux utitlities.
+               description
+                       The libselinux-utils package contains the utilities.
+               end
+
+               files
+                       /usr/sbin/*
+                       /usr/share/man/man{5,8}/*
+               end
+       end
+       
+       #package python-selinux
+       #       summary =  SELinux python bindings.
+       #       description = SELinux python bindings for libselinux.
+       #
+       #       def files
+       #               /usr/lib/python*
+       #       end
+       #end
+       
+       
+end