mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-06 09:21:00 +01:00
196 lines
6.8 KiB
RPMSpec
196 lines
6.8 KiB
RPMSpec
# $Id$
|
|
# ----------------------------------------------------------------------
|
|
# Copyright (c) 2004, 2005, 2006 NOVELL (All rights reserved)
|
|
#
|
|
# This software is licensed under the terms of the GNU Lesser General
|
|
# Public License, version 2.1. Please see the file COPYING.LGPL.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this program; if not, contact Novell, Inc.
|
|
# ----------------------------------------------------------------------
|
|
#
|
|
# norootforbuild
|
|
#
|
|
# Check first to see if distro is already defined. It should be defined
|
|
# by our makefile
|
|
%if ! %{?distro:1}0
|
|
%define distro suse
|
|
%endif
|
|
|
|
# Check to see what architecture we are building on so we know where
|
|
# the lib should be installed.
|
|
# Note: alpha and ia64 are 64bit systems but they have no 32 bit userland
|
|
# so they install their libs to /lib instead of /lib64
|
|
# FIXME: will see what happens when we need to do a 64bit build on RHEL
|
|
%ifarch x86_64 mips64 ppc64 sparc64 s390x
|
|
%define build64 1
|
|
%endif
|
|
# else anything that doesn't specifically have a lib64 dir
|
|
# i386 i686 mips ppc sparc arm alpha ia64
|
|
|
|
Name: libapparmor
|
|
Summary: Library to provide key AppArmor symbols
|
|
Version: @@immunix_version@@
|
|
Release: @@repo_version@@
|
|
%if %distro == "suse"
|
|
Group: System/Libraries
|
|
%else
|
|
Group: System Environment/Libraries
|
|
%endif
|
|
Source: %{name}-%{version}-@@repo_version@@.tar.gz
|
|
License: LGPL
|
|
BuildRoot: %{?_tmppath:}%{!?_tmppath:/var/tmp}/%{name}-%{version}-build
|
|
URL: http://forge.novell.com/modules/xfmod/project/?apparmor
|
|
BuildRequires: glibc-devel
|
|
%if %{?build64:1}0
|
|
#BuildRequires: linux32
|
|
%endif
|
|
Obsoletes: libimmunix
|
|
Provides: libimmunix
|
|
|
|
%description
|
|
This package provides the libapparmor library, which contains the change_hat(2)
|
|
symbol, used for sub-process confinement by AppArmor. Applications that
|
|
wish to make use of change_hat(2) need to link against this library.
|
|
This package is part of a suite of tools that used to be named SubDomain.
|
|
|
|
%prep
|
|
%if %{?build64:1}0
|
|
%setup -q -c -n %{name}32
|
|
%setup -D -q
|
|
%else
|
|
%setup -q
|
|
%endif
|
|
|
|
|
|
%build
|
|
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
%if %{?build64:1}0
|
|
# build 32 bit version first
|
|
%define CFLAGS32 "-g -O2 -Wall -Wstrict-prototypes -pipe -fpic -m32"
|
|
%ifarch x86_64
|
|
%define env32 linux32
|
|
%endif
|
|
%ifarch mips64
|
|
# FIXME don't know what's supposed to be here
|
|
%define env32 mips32
|
|
%endif
|
|
%ifarch ppc64
|
|
%define env32 powerpc32
|
|
%endif
|
|
%ifarch sparc64
|
|
%define env32 sparc32
|
|
%endif
|
|
%ifarch s390x
|
|
%define env32 s390
|
|
# s390 isn't actually 32bit it an odd ball 31bit machine
|
|
%undefine CFLAGS32
|
|
%define CFLAGS32 "-g -O2 -Wall -Wstrict-prototypes -pipe -fpic -m31"
|
|
%endif
|
|
# FIXME - disabled 32bit builds on 64bit platforms
|
|
echo "FIXME - disabled 32bit builds on 64bit platforms"
|
|
#%{env32} make CFLAGS=%{CFLAGS32} -C ../%{name}32/%{name}-%{version}
|
|
%endif
|
|
|
|
make CFLAGS="${RPM_OPT_FLAGS}"
|
|
|
|
%install
|
|
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
|
%if %{?build64:1}0
|
|
# FIXME - disabled 32bit builds on 64bit platforms
|
|
echo "FIXME - disabled 32bit installs on 64bit platforms"
|
|
#make install DESTDIR=${RPM_BUILD_ROOT} LIB=lib -C ../%{name}32/%{name}-%{version}
|
|
%endif
|
|
make install DESTDIR=${RPM_BUILD_ROOT} LIB=%{_lib} VERSION=%{version} \
|
|
RELEASE=%{release} MANDIR=%{_mandir}
|
|
|
|
%clean
|
|
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
# don't use -p here, breaks slackware package builds
|
|
%post
|
|
/sbin/ldconfig
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
|
|
%files
|
|
%defattr (-,root,root)
|
|
%if %{?build64:1}0
|
|
# FIXME - disabled 32bit builds on 64bit platforms
|
|
#/lib/lib*
|
|
#/usr/lib/lib*
|
|
%endif
|
|
/%{_lib}/lib*
|
|
%{_libdir}/lib*
|
|
%{_prefix}/include/sys/*.h
|
|
%doc COPYING.LGPL
|
|
%{_mandir}/man*/*
|
|
%doc *.[0-9].html
|
|
%doc common/apparmor.css
|
|
|
|
%changelog
|
|
* Tue Apr 7 2007 - sbeattie@suse.de
|
|
- Add change_hat manpage to package
|
|
* Thu Jan 18 2007 - sbeattie@suse.de
|
|
- Add a clean stage to remove buildroot to specfile
|
|
* Fri Feb 17 2006 Seth Arnold <seth.arnold@suse.de> 2.0-4.1
|
|
- use gettid() instead of /proc/self
|
|
* Fri Feb 10 2006 Steve Beattie <sbeattie@suse.de> 2.0-3.2
|
|
- Use RPM_OPT_FLAGS
|
|
- Fix installed library version to match specfile version
|
|
* Wed Feb 1 2006 Steve Beattie <sbeattie@suse.de> 2.0-3.1
|
|
- Fix prototype to match change_hat(2) manpage
|
|
* Mon Jan 23 2006 Steve Beattie <sbeattie@suse.de> 2.0-3
|
|
- Rename to libapparmor.so and apparmor.h
|
|
* Thu Jan 5 2006 Steve Beattie <sbeattie@suse.de> 2.0-2
|
|
- Add svn repo number to tarball
|
|
* Wed Dec 7 2005 Steve Beattie <sbeattie@suse.de> 2.0-1
|
|
- Reset version for inclusion is SUSE autobuild
|
|
* Wed Dec 7 2005 Steve Beattie <sbeattie@suse.de> 1.99-8
|
|
- Disable 32bit builds on 64bit platforms for now
|
|
* Mon Dec 5 2005 Steve Beattie <sbeattie@suse.de> 1.99-7
|
|
- Rename package to libapparmor
|
|
* Wed Aug 10 2005 Steve Beattie <sbeattie@suse.de> 1.99-6_imnx
|
|
- Cleanup some of the deprecated exported symbols
|
|
* Thu Aug 4 2005 John Johansen <jjohansen@novell.com> 1.99-5_imnx
|
|
- and -m31 flag for s390
|
|
* Mon Jul 11 2005 Steve Beattie <sbeattie@novell.com> 1.99-4_imnx
|
|
- get rid of libimmunix_post_upgrade
|
|
- Re-license to LGPL
|
|
- update description
|
|
* Fri May 27 2005 Steve Beattie <steve@immunix.com> 1.99-3_imnx
|
|
- Clear token buffer before freeing.
|
|
- Error handling cleanup.
|
|
* Fri Feb 18 2005 Steve Beattie <steve@immunix.com> 1.99-2_imnx
|
|
- Use the right command for the 32bit env on 64bit platforms
|
|
- Support for 64bit builds on systems with combined 32/64 support
|
|
* Fri Feb 4 2005 Seth Arnold <sarnold@immunix.com> 1.99-1_imnx
|
|
- Reversion to 1.99
|
|
* Mon Nov 8 2004 Steve Beattie <steve@immunix.com> 1.2-3_imnx
|
|
- Finish conversion to slack-capable infrastructure.
|
|
* Thu Oct 28 2004 Steve Beattie <steve@immunix.com> 1.2-2_imnx
|
|
- Added a 'make install' target for prelim slack support
|
|
* Tue Oct 12 2004 Steve Beattie <steve@immunix.com> 1.2-1_imnx
|
|
- Bump version after shass-1.1 branched off
|
|
* Thu Sep 23 2004 Steve Beattie <steve@immunix.com> 1.0-13_imnx
|
|
- Vastly simplify the string handling in change_hat().
|
|
* Thu Sep 9 2004 Steve Beattie <steve@immunix.com> 1.0-12_imnx
|
|
- Conditionalize group the package shows up in.
|
|
* Thu Sep 9 2004 Steve Beattie <steve@immunix.com> 1.0-11_imnx
|
|
- Fix so change_hat functions correctly even when the token is zero.
|
|
* Thu Sep 2 2004 Steve Beattie <steve@immunix.com> 1.0-10_imnx
|
|
- Added that it provides %{_prefix}/sbin/libimmunix_post_upgrade, this
|
|
was somehow breaking yast.
|
|
* Mon Aug 30 2004 Steve Beattie <steve@immunix.com> 1.0-9_imnx
|
|
- Copyright cleanups.
|
|
* Wed Jul 21 2004 Steve Beattie <steve@immunix.com> 1.0-8_imnx
|
|
- add basis for conditional distro support
|
|
* Thu May 28 2004 Tony Jons <tony@immunix.com> 1.0-7_imnx
|
|
- Add "changehat" command word to start of string written to /proc/pid/attr
|