quota/quota.spec
Marcus Meissner 908ece3114 Accepting request 178905 from home:rudi_m
- last changes are ompatible again with openSUSE < 12.3
- update to 4.01

To review only the harmless portability changes only you could compare
  osc rdiff -r32:6 Base:System/quota  home:rudi_m/quota
and
  osc rdiff -r27:6 Base:System/quota  home:rudi_m/quota
(if rdiff would work at all)

OBS-URL: https://build.opensuse.org/request/show/178905
OBS-URL: https://build.opensuse.org/package/show/Base:System/quota?expand=0&rev=33
2013-06-14 12:11:53 +00:00

187 lines
4.7 KiB
RPMSpec

#
# spec file for package quota
#
# Copyright (c) 2013 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/
#
Name: quota
BuildRequires: dbus-1-devel
BuildRequires: e2fsprogs-devel
%if 0%{?suse_version} > 1140
BuildRequires: libnl-1_1-devel
%else
BuildRequires: libnl-devel
%endif
BuildRequires: pkg-config
BuildRequires: tcpd-devel
Version: 4.01
Release: 0
PreReq: %insserv_prereq %fillup_prereq
Url: http://sourceforge.net/projects/linuxquota/
Summary: Disk Quota System
License: GPL-2.0 and BSD-3-Clause
Group: System/Filesystems
Source: %{name}-%{version}.tar.gz
Source1: %{name}-SUSE.tar.bz2
Patch1: %{name}-4.00-makefile.patch
Patch2: %{name}-4.01-warnquota.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The quota subsystem allows a system administrator to set soft and hard
limits on used space and the number of inodes used for users and
groups. The kernel must be compiled with disk quota support enabled
(SUSE kernels have this support).
Authors:
--------
Marco van Wieringen <mvw@planets.ow.nl>
Johan Ekenberg <johan@ekenberg.nu>
Jan Kara <jack@suse.cz>
%package nfs
Summary: Disk Quota System on NFS
Group: System/Filesystems
Requires: quota = %version
PreReq: %insserv_prereq %fillup_prereq
# Require the services needed to be present for quotad service: portmap, nfsserver, network
Requires: nfs-kernel-server
%if 0%{?suse_version} >= 1230
Requires: rpcbind
%else
Requires: portmap
%endif
Requires: sysconfig
# Split provides
Provides: quota:/etc/init.d/quotad
%description nfs
The quotad init script, which provides quota support on NFS mounts.
Authors:
--------
Marco van Wieringen <mvw@planets.ow.nl>
Johan Ekenberg <johan@ekenberg.nu>
Jan Kara <jack@suse.cz>
%prep
%setup -q -n quota-tools -a 1
%patch1
%patch2
%build
%configure \
--sysconfdir=%{_sysconfdir} \
--enable-netlink \
--enable-strip-binaries=no
make
%install
install -d -m 755 ${RPM_BUILD_ROOT}/etc/init.d
install -d -m 755 ${RPM_BUILD_ROOT}/sbin
install -d -m 755 ${RPM_BUILD_ROOT}/var/adm/fillup-templates
make install ROOTDIR=${RPM_BUILD_ROOT}
#UsrMerge
ln -s %{_sbindir}/{quotacheck,quotaon,quotaoff} ${RPM_BUILD_ROOT}/sbin/
#EndUsrMerge
#installing ldap-scripts
install -m 755 ldap-scripts/*pl ${RPM_BUILD_ROOT}/usr/sbin/
install -m 755 ldap-scripts/edquota_editor ${RPM_BUILD_ROOT}/usr/sbin/
%if 0%{?suse_version} >= 1230
cp SUSE/quotad ${RPM_BUILD_ROOT}/etc/init.d
%else
cp SUSE/{quotad,boot.quota} ${RPM_BUILD_ROOT}/etc/init.d
%endif
ln -s ../../etc/init.d/quotad ${RPM_BUILD_ROOT}/usr/sbin/rcquotad
%find_lang %{name}
cp SUSE/sysconfig.nfs-quota $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.nfs-quota
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{?suse_version} < 1230
%post
%{fillup_and_insserv -f -y boot.quota}
%endif
%post nfs
%{fillup_only -an nfs}
%if 0%{?suse_version} < 1230
%preun
%stop_on_removal boot.quota
%endif
%preun nfs
%stop_on_removal quotad
%if 0%{?suse_version} < 1230
%postun
%{insserv_cleanup}
%endif
%postun nfs
%{insserv_cleanup}
%files -f %{name}.lang
%defattr(-,root,root)
%config /etc/quotagrpadmins
%if 0%{?suse_version} < 1230
%config /etc/init.d/boot.quota
%endif
%config /etc/quotatab
%config /etc/warnquota.conf
%doc SUSE/README.SUSE README.* doc
%doc %{_mandir}/man?/*
#UsrMerge
/sbin/quotacheck
/sbin/quotaoff
/sbin/quotaon
#EndUsrMerge
%{_bindir}/quota
%{_bindir}/quotasync
%{_sbindir}/applySystemQuotas.pl
%{_sbindir}/convertquota
%{_sbindir}/edquota
%{_sbindir}/edquota_editor
%{_sbindir}/quot
%{_sbindir}/quota_nld
%{_sbindir}/quotacheck
%{_sbindir}/quotaoff
%{_sbindir}/quotaon
%{_sbindir}/quotastats
%{_sbindir}/repquota
%{_sbindir}/setSystemQuotas.pl
%{_sbindir}/setquota
%{_sbindir}/setquota-ldap.pl
%{_sbindir}/warnquota
%{_sbindir}/xqmstats
%files nfs
%defattr(-,root,root)
%config /etc/init.d/quotad
%doc SUSE/README.quotad.SUSE
%{_sbindir}/rpc.rquotad
%{_sbindir}/rcquotad
%{_localstatedir}/adm/fillup-templates/sysconfig.nfs-quota
# these files conflicts with glibc rpm
%exclude /usr/include/rpcsvc/*
%changelog