usermin/usermin.spec

174 lines
5.5 KiB
RPMSpec
Raw Normal View History

Name: usermin
Version: 1.600
Release: 1mamba
Summary: A web-based interface for webmail, password changing, mail filters, fetchmail and much more
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.webmin.com/usermin.html
Source: http://downloads.sourceforge.net/sourceforge/webadmin/usermin-%{version}.tar.gz
Source1: usermin-initscript
Source2: usermin-desktop
Patch0: %{name}-1.400-install_noroot.patch
Patch1: %{name}-1.400-openmamba.patch
License: GPL
Requires: perl-Authen-PAM
Requires: lsof
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Usermin is a web-based interface for webmail, password changing, mail filters, fetchmail and much more. It is designed for use by regular non-root users on a Unix system, and limits them to tasks that they would be able to perform if logged in via SSH or at the console. See the standard modules page for a list of all the functions built into Usermin.
%prep
%setup -q
%patch0 -p1
#%patch1 -p1
find . -type f -exec sed -i 's|/usr/local/bin/perl|/usr/bin/perl|g' {} \;
%define _use_internal_dependency_generator 0
%define __find_provides %{_builddir}/usermin-%{version}/find_provides.sh
cat > %{_builddir}/usermin-%{version}/find_provides.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} | \
grep -v "perl(.::" | grep -v "perl(..::" | grep -v "perl()"
_EOF
chmod +x %{_builddir}/usermin-%{version}/find_provides.sh
%define __find_requires %{_builddir}/usermin-%{version}/find_requires.sh
cat > %{_builddir}/usermin-%{version}/find_requires.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} | \
grep -v "perl(.::" | grep -v "perl(..::" | grep -v "perl()"
_EOF
chmod +x %{_builddir}/usermin-%{version}/find_requires.sh
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}{%{_sysconfdir}/usermin,%{_prefix},/var/log/usermin,/opt/usermin}
config_dir=%{buildroot}%{_sysconfdir}/usermin \
var_dir=%{buildroot}/var/log/usermin \
perl=%{_bindir}/perl \
port=20000 \
login=admin \
password=tmppass \
ssl=1 \
atboot=0 \
nostart=1 \
tempdir=. \
./setup.sh %{buildroot}/opt/usermin
rm -f %{buildroot}%{_sysconfdir}/usermin/uninstall.sh
# strip buildroot from configuration files
find %{buildroot}%{_sysconfdir}/usermin -type f -exec sed -i 's|%{buildroot}||g' {} \;
# install initscript
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/usermin
# install desktop link
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/usermin.desktop
# install pam file
install -D -m 0644 usermin-pam %{buildroot}%{_sysconfdir}/pam.d/usermin
mkdir -p %{buildroot}/var/log/usermin
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
# new install
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add usermin
service usermin start
fi
if [ $1 -gt 1 ]; then
# upgrade
service usermin restart
fi
exit 0
%preun
#erase
if [ $1 -eq 0 ]; then
service usermin stop 2>/dev/null
/sbin/chkconfig --del usermin
fi
exit 0
%files
%defattr(-,root,root)
%{_initrddir}/usermin
%dir %{_sysconfdir}/usermin
%config(noreplace) %{_sysconfdir}/usermin/*
%{_sysconfdir}/pam.d/usermin
%{_datadir}/applications/usermin.desktop
%dir /opt/usermin
/opt/usermin/*
%dir /var/log/usermin
%doc LICENCE README
%changelog
* Mon May 26 2014 Automatic Build System <autodist@mambasoft.it> 1.600-1mamba
- automatic update by autodist
* Tue Mar 18 2014 Automatic Build System <autodist@mambasoft.it> 1.590-1mamba
- automatic version update by autodist
* Thu Feb 06 2014 Automatic Build System <autodist@mambasoft.it> 1.570-1mamba
- automatic version update by autodist
* Tue Aug 20 2013 Automatic Build System <autodist@mambasoft.it> 1.560-1mamba
- automatic version update by autodist
* Fri May 17 2013 Automatic Build System <autodist@mambasoft.it> 1.550-1mamba
- automatic version update by autodist
* Mon Feb 25 2013 Automatic Build System <autodist@mambasoft.it> 1.540-1mamba
- automatic version update by autodist
* Sun Nov 25 2012 Automatic Build System <autodist@mambasoft.it> 1.530-1mamba
- automatic version update by autodist
* Fri Oct 12 2012 Automatic Build System <autodist@mambasoft.it> 1.520-1mamba
- automatic version update by autodist
* Sat Aug 11 2012 Automatic Build System <autodist@mambasoft.it> 1.510-1mamba
- automatic version update by autodist
* Wed May 02 2012 Automatic Build System <autodist@mambasoft.it> 1.500-1mamba
- automatic version update by autodist
* Wed Aug 10 2011 Automatic Build System <autodist@mambasoft.it> 1.480-1mamba
- automatic version update by autodist
* Fri Apr 15 2011 Automatic Build System <autodist@mambasoft.it> 1.470-1mamba
- automatic update by autodist
* Mon Dec 06 2010 Automatic Build System <autodist@mambasoft.it> 1.460-1mamba
- automatic update by autodist
* Mon Oct 04 2010 Automatic Build System <autodist@mambasoft.it> 1.450-1mamba
- automatic update by autodist
* Fri Apr 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.440-1mamba
- update to 1.440
* Tue Dec 08 2009 Automatic Build System <autodist@mambasoft.it> 1.430-1mamba
- automatic update by autodist
* Wed Sep 23 2009 Automatic Build System <autodist@mambasoft.it> 1.420-1mamba
- automatic update by autodist
* Mon Jun 22 2009 Automatic Build System <autodist@mambasoft.it> 1.410-1mamba
- automatic update by autodist
* Thu Apr 30 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.400-1mamba
- package created by autospec