]> git.ipfire.org Git - ipfire-3.x.git/blame - libselinux/libselinux.nm
libselinux: Make package work on x86_64.
[ipfire-3.x.git] / libselinux / libselinux.nm
CommitLineData
72e67668 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
72e67668
SS
4###############################################################################
5
802ea3af 6name = libselinux
02274bb5 7version = 2.1.9
b945d857 8release = 2
72e67668 9
802ea3af
MT
10groups = System/Libraries
11url = http://www.selinuxproject.org
12license = Public Domain
13summary = SELinux library and simple utilities.
72e67668 14
802ea3af 15description
397ea7dc
SS
16 libselinux provides an API for SELinux applications to get and set
17 process and file security contexts and to obtain security policy
72e67668 18 decisions.
802ea3af
MT
19end
20
802ea3af
MT
21sources = %{thisapp}.tgz
22
23build
24 requires
25 libsepol-devel
5994c727 26 libsepol-static
802ea3af
MT
27 python-devel
28 swig
29 end
30
31 build
32 make clean
e6375510
MT
33 make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" swigify
34 make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" all
35 make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" pywrap
802ea3af
MT
36 end
37
b945d857
SS
38 # Install libraries to correct place.
39 make_install_targets += \
40 LIBDIR="%{BUILDROOT}%{libdir}" \
e6375510
MT
41 SHLIBDIR="%{BUILDROOT}/%{lib}"
42
802ea3af 43 install_cmds
b945d857 44 make install-pywrap %{make_install_targets} DESTDIR=%{BUILDROOT}
802ea3af
MT
45
46 # Remove unwanted binaries
47 rm -f %{BUILDROOT}/usr/sbin/compute_*
48 rm -f %{BUILDROOT}/usr/sbin/deftype
49 rm -f %{BUILDROOT}/usr/sbin/execcon
50 rm -f %{BUILDROOT}/usr/sbin/getenforcemode
51 rm -f %{BUILDROOT}/usr/sbin/getfilecon
52 rm -f %{BUILDROOT}/usr/sbin/getpidcon
53 rm -f %{BUILDROOT}/usr/sbin/mkdircon
54 rm -f %{BUILDROOT}/usr/sbin/policyvers
55 rm -f %{BUILDROOT}/usr/sbin/setfilecon
56 rm -f %{BUILDROOT}/usr/sbin/selinuxconfig
57 rm -f %{BUILDROOT}/usr/sbin/selinuxdisable
58 rm -f %{BUILDROOT}/usr/sbin/getseuser
59 rm -f %{BUILDROOT}/usr/sbin/selinux_check_securetty_context
60
61 # Move binaries from /sbin to /usr/sbin
62 mv %{BUILDROOT}/sbin/* %{BUILDROOT}/usr/sbin
802ea3af
MT
63 end
64end
65
66packages
67 package %{name}
d73faf26 68
802ea3af
MT
69 package %{name}-devel
70 template DEVEL
71 end
1f9bc2f0 72
802ea3af
MT
73 package %{name}-utils
74 summary = SELinux libselinux utitlities.
75 description
76 The libselinux-utils package contains the utilities.
77 end
78
79 files
80 /usr/sbin/*
81 /usr/share/man/man{5,8}/*
82 end
83 end
d73faf26
SS
84
85 package python-selinux
86 summary = SELinux python bindings.
87 description = SELinux python bindings for libselinux.
88
89 def files
b945d857 90 %{libdir}/python*
d73faf26
SS
91 end
92 end
5994c727
SS
93
94 package %{name}-debuginfo
95 template DEBUGINFO
96 end
802ea3af 97end