65 lines
1.6 KiB
RPMSpec
65 lines
1.6 KiB
RPMSpec
Summary: LibreSchool NFS home profiles configuration
|
|
Name: libreschool-nfs
|
|
Version: 6.9
|
|
Release: 1
|
|
License: GPL
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
|
Source0: %{name}-%{version}.tar.gz
|
|
Source1: COPYING
|
|
URL: %{url_prefix}/%{name}
|
|
Requires: libreschool-release
|
|
Requires: nethserver-directory
|
|
Requires: nfs-utils
|
|
BuildRequires: nethserver-devtools
|
|
|
|
%description
|
|
LibreSchool NFS home profiles configuration
|
|
|
|
%prep
|
|
%setup
|
|
|
|
%build
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
(cd root ; find . -depth -not -name '*.orig' -print | cpio -dump $RPM_BUILD_ROOT)
|
|
%{genfilelist} $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist
|
|
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist
|
|
|
|
%files -f %{name}-%{version}-%{release}-filelist
|
|
%defattr(-,root,root)
|
|
|
|
%post
|
|
chkconfig nfs on
|
|
chkconfig rpcbind on
|
|
/sbin/e-smith/db configuration set nfs service \
|
|
status enabled \
|
|
TCPPort 2049 \
|
|
access private
|
|
/sbin/e-smith/db configuration set rpcbind service \
|
|
status enabled \
|
|
TCPPort 111 \
|
|
UDPPort 111 \
|
|
access private
|
|
/sbin/e-smith/expand-template /etc/exports
|
|
/sbin/service nfs start >/dev/null 2>&1 || :
|
|
/sbin/service rpcbind start >/dev/null 2>&1 || :
|
|
/usr/sbin/exportfs -r
|
|
/sbin/e-smith/signal-event firewall-adjust
|
|
/usr/bin/ldapmodify -Y EXTERNAL -f /usr/share/libreschool-nfs/patch.ldif >/dev/null 2>&1 || :
|
|
|
|
%postun
|
|
#if [ "$1" = 1 ]; then
|
|
# #upgrade
|
|
#fi
|
|
if [ "$1" = 0 ]; then
|
|
#uninstallation
|
|
/sbin/e-smith/expand-template /etc/exports
|
|
/usr/sbin/exportfs -r
|
|
fi
|
|
|
|
%changelog
|
|
* Sat Nov 4 2017 Paolo Asperti <paolo@asperti.com> - 6.9-1
|
|
- First release
|