]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - libselinux/libselinux.nm
libselinux: Make package work on x86_64.
[people/ms/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
MT
6name = libselinux
7version = 2.0.96
e6375510 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
72e67668
SS
16 libselinux provides an API for SELinux applications to get and set \
17 process and file security contexts and to obtain security policy \
18 decisions.
802ea3af
MT
19end
20
21source_dl =
22sources = %{thisapp}.tgz
23
24build
25 requires
26 libsepol-devel
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
e6375510
MT
38 make_install_targets += LIBDIR="%{BUILDROOT}%{libdir}" \
39 SHLIBDIR="%{BUILDROOT}/%{lib}"
40
802ea3af 41 install_cmds
e6375510 42 make install-pywrap DESTDIR=%{BUILDROOT} LIBDIR="%{BUILDROOT}%{libdir}"
802ea3af
MT
43
44 # Remove unwanted binaries
45 rm -f %{BUILDROOT}/usr/sbin/compute_*
46 rm -f %{BUILDROOT}/usr/sbin/deftype
47 rm -f %{BUILDROOT}/usr/sbin/execcon
48 rm -f %{BUILDROOT}/usr/sbin/getenforcemode
49 rm -f %{BUILDROOT}/usr/sbin/getfilecon
50 rm -f %{BUILDROOT}/usr/sbin/getpidcon
51 rm -f %{BUILDROOT}/usr/sbin/mkdircon
52 rm -f %{BUILDROOT}/usr/sbin/policyvers
53 rm -f %{BUILDROOT}/usr/sbin/setfilecon
54 rm -f %{BUILDROOT}/usr/sbin/selinuxconfig
55 rm -f %{BUILDROOT}/usr/sbin/selinuxdisable
56 rm -f %{BUILDROOT}/usr/sbin/getseuser
57 rm -f %{BUILDROOT}/usr/sbin/selinux_check_securetty_context
58
59 # Move binaries from /sbin to /usr/sbin
60 mv %{BUILDROOT}/sbin/* %{BUILDROOT}/usr/sbin
61
62 # Remove python module
63 rm -rvf %{BUILDROOT}/usr/lib/python*
64 end
65end
66
67packages
68 package %{name}
69 end
1f9bc2f0 70
802ea3af
MT
71 package %{name}-devel
72 template DEVEL
73 end
1f9bc2f0 74
802ea3af
MT
75 package %{name}-utils
76 summary = SELinux libselinux utitlities.
77 description
78 The libselinux-utils package contains the utilities.
79 end
80
81 files
82 /usr/sbin/*
83 /usr/share/man/man{5,8}/*
84 end
85 end
1f9bc2f0 86
802ea3af
MT
87 #package python-selinux
88 # summary = SELinux python bindings.
89 # description = SELinux python bindings for libselinux.
90 #
91 # def files
92 # /usr/lib/python*
93 # end
94 #end
1f9bc2f0
MT
95
96
97
98 package %{name}-debuginfo
99 template DEBUGINFO
100 end
802ea3af 101end