aaa_base/aaa_base.spec
Ruediger Oertel 09ebfe6986 - split off aaa_base extras subpackage with:
- ls settings and aliases
  - bash completion
  - other generic shell aliases
  - quick_halt/poweroff/reboot script
  - some default cronjobs
- modified bash.bashrc and csh.cshrc to split out ls settings
- drop alias for dir: that one has its own binary for a while
- recommend aaa_base-extras from main package

OBS-URL: https://build.opensuse.org/package/show/Base:System/aaa_base?expand=0&rev=131
2010-07-29 16:04:03 +00:00

147 lines
4.3 KiB
RPMSpec

#
# spec file for package aaa_base (Version 11.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: aaa_base
Version: 11.3
Release: 9
License: GPLv2+
Group: System/Fhs
Provides: bin bootutls etc skeleng skelger
Provides: aaa_skel = %{version}-%{release}
Obsoletes: aaa_skel < %{version}
Requires: filesystem distribution-release /bin/mktemp /usr/bin/find /usr/bin/tput /usr/bin/xargs mingetty /bin/login cpio psmisc
Recommends: cron logrotate netcfg udev net-tools aaa_base-extras
PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv
AutoReqProv: on
Summary: SUSE Linux Base Package
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: aaa_base.tar.bz2
Source3: aaa_base.specialfilelist
Source4: aaa_base.extrafilelist
Source5: arch_special.tar.bz2
Source7: sysconfig_parts.tar.bz2
Source8: get_kernel_version.c
Source20: aaa_base-rpmlintrc
Source21: aaa_base.pre
Source22: aaa_base.post
%description
This package installs several important configuration files. Central
scripts like SuSEconfig are also in this package.
%package extras
License: GPLv2+
Summary: SUSE Linux Base Package (recommended part)
Group: System/Fhs
Requires: %{name} = %{version}
%description extras
The parts of aaa_base that should be installed by default but are not
strictly required to run a system. (Shell aliases, bash completions
and convenience hacks).
%prep
%setup -n aaa_base -b 5 -b 7
cd ..
mkdir -p scripts
cp -v %{SOURCE21} scripts
cp -v %{SOURCE22} scripts
%build
gcc $RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 $RPM_SOURCE_DIR/get_kernel_version.c -o $RPM_SOURCE_DIR/get_kernel_version
%install
install -d -m 700 root
# make sure it does not creep in again
test -d ../aaa_base/root/.gnupg && exit 1
cp -a ../aaa_base/* $RPM_BUILD_ROOT
# for the release
rm $RPM_BUILD_ROOT/etc/profile.d/malloc-debug.*
cp $RPM_SOURCE_DIR/get_kernel_version $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
for i in $RPM_BUILD_DIR/sysconfig_parts/sysconfig.* ; do
cp $i $RPM_BUILD_ROOT/var/adm/fillup-templates/
done
#
## do arch specific patches BEGIN
#
pushd $RPM_BUILD_ROOT
test -d $RPM_BUILD_DIR/arch_special/$RPM_ARCH && \
{
for file in $RPM_BUILD_DIR/arch_special/$RPM_ARCH/* ; do
patch -p0 --input=$file
done
}
#
# delete .orig files
#
find $RPM_BUILD_ROOT -name "*.orig" | xargs -r rm
popd
#
## do arch specific patches END
#
#
# mark these as ghost
for i in passwd group shadow gshadow ; do
touch $RPM_BUILD_ROOT/var/adm/fillup-templates/$i.aaa_base
done
#
# generate the file-list with config-files et al.
#
test -x /usr/sbin/Check && /usr/sbin/Check
#
for i in `( cd $RPM_BUILD_ROOT ; find * | sort )` ; do
grep -qx "/$i" %{S:4} && continue
if ! grep -E "^.* /$i\$" %{S:3} ; then
if ! test -d $RPM_BUILD_ROOT/$i ; then
echo "/$i"
fi
fi
done > aaa_base.files
for i in `( cd $RPM_BUILD_ROOT ; find * | sort )` ; do
grep -qx "/$i" %{S:4} || continue
if ! grep -E "^.* /$i\$" %{S:3} ; then
if ! test -d $RPM_BUILD_ROOT/$i ; then
echo "/$i"
fi
fi
done > aaa_base-extras.files
%pre -f ../scripts/aaa_base.pre
%post -f ../scripts/aaa_base.post
%postun
%insserv_cleanup
%triggerpostun -- aaa_base
if test -f /root/.gnupg/secring.gpg.aaa_save -a ! -f /root/.gnupg/secring.gpg ; then
mv /root/.gnupg/secring.gpg.aaa_save /root/.gnupg/secring.gpg
fi
rm -f /root/.gnupg/secring.gpg.aaa_save
%files -f aaa_base.files
%defattr(-,root,root)
%files extras -f aaa_base-extras.files
%defattr(-,root,root)
%changelog