- Separate out libselinux-python bindings into separate rpm

This commit is contained in:
Daniel J Walsh 2005-11-28 22:02:25 +00:00
parent 555b9174f8
commit 4bb08c52c4
2 changed files with 28 additions and 12 deletions

View File

@ -1,14 +1,14 @@
diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-1.27.22/src/Makefile diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-1.27.22/src/Makefile
--- nsalibselinux/src/Makefile 2005-11-16 21:39:52.000000000 -0500 --- nsalibselinux/src/Makefile 2005-11-16 21:39:52.000000000 -0500
+++ libselinux-1.27.22/src/Makefile 2005-11-17 12:05:02.000000000 -0500 +++ libselinux-1.27.22/src/Makefile 2005-11-28 16:48:08.000000000 -0500
@@ -3,25 +3,41 @@ @@ -3,25 +3,41 @@
LIBDIR ?= $(PREFIX)/lib LIBDIR ?= $(PREFIX)/lib
SHLIBDIR ?= $(DESTDIR)/lib SHLIBDIR ?= $(DESTDIR)/lib
INCLUDEDIR ?= $(PREFIX)/include INCLUDEDIR ?= $(PREFIX)/include
+PYINC ?= /usr/include/python2.4
+PYLIB ?= /usr/lib/python2.4
+PYLIBVER ?= python2.4 +PYLIBVER ?= python2.4
+PYTHONLIBDIR ?= $(LIBDIR)/python2.4 +PYINC ?= /usr/include/$(PYLIBVER)
+PYLIB ?= /usr/lib/$(PYLIBVER)
+PYTHONLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
LIBVERSION = 1 LIBVERSION = 1
@ -42,7 +42,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-1.27.
+ $(CC) $(CFLAGS) -I$(PYINC) -fpic -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) -I$(PYINC) -fpic -DSHARED -c -o $@ $<
+ +
+$(SWIGSO): $(SWIGLOBJ) +$(SWIGSO): $(SWIGLOBJ)
+ $(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -l$(PYLIBVER) -L$(LIBDIR) -Wl,-soname,$@,-z,defs + $(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
+ +
$(LIBSO): $(LOBJS) $(LIBSO): $(LOBJS)
$(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs
@ -185,3 +185,4 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-
+ +
+extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); +extern int getseuserbyname(const char *linuxuser, char **seuser, char **level);
+ +
+}

View File

@ -2,7 +2,7 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 1.27.22 Version: 1.27.22
Release: 3 Release: 4
License: Public domain (uncopyrighted) License: Public domain (uncopyrighted)
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@ -28,13 +28,22 @@ libselinux provides an API for SELinux applications to get and set
process and file security contexts and to obtain security policy process and file security contexts and to obtain security policy
decisions. Required for any applications that use the SELinux API. decisions. Required for any applications that use the SELinux API.
%package python
Summary: python bindings for libselinux
Group: Development/Libraries
Requires: libselinux = %{version}-%{release}
%description python
The libselinux-python package contains the python bindings for developing SELinux
applications.
%package devel %package devel
Summary: Header files and libraries used to build SELinux Summary: Header files and libraries used to build SELinux
Group: Development/Libraries Group: Development/Libraries
Requires: libselinux = %{version}-%{release} Requires: libselinux = %{version}-%{release}
%description devel %description devel
The selinux-devel package contains the static libraries and header files The libselinux-devel package contains the static libraries and header files
needed for developing SELinux applications. needed for developing SELinux applications.
%prep %prep
@ -77,6 +86,12 @@ exit 0
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files
%defattr(-,root,root,0755)
/%{_lib}/libselinux.so.*
%{_sbindir}/*
%{_mandir}/man8/*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libselinux.a %{_libdir}/libselinux.a
@ -85,17 +100,17 @@ exit 0
%{_includedir}/selinux/ %{_includedir}/selinux/
%{_mandir}/man3/* %{_mandir}/man3/*
%files %files python
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
/%{_lib}/libselinux.so.*
%{_sbindir}/*
%{_mandir}/man8/*
%{_libdir}/python2.4/site-packages/_selinux.so %{_libdir}/python2.4/site-packages/_selinux.so
%{_libdir}/python2.4/site-packages/selinux.py* %{_libdir}/python2.4/site-packages/selinux.py*
%changelog %changelog
* Mon Nov 28 2005 Dan Walsh <dwalsh@redhat.com> 1.27.22-4
- Separate out libselinux-python bindings into separate rpm
* Thu Nov 17 2005 Dan Walsh <dwalsh@redhat.com> 1.27.22-3 * Thu Nov 17 2005 Dan Walsh <dwalsh@redhat.com> 1.27.22-3
- Readd libsetrans requirement - Read libsetrans requirement
* Thu Nov 17 2005 Dan Walsh <dwalsh@redhat.com> 1.27.22-2 * Thu Nov 17 2005 Dan Walsh <dwalsh@redhat.com> 1.27.22-2
- Add python bindings - Add python bindings