Summary: smserver rpm to setup photos digital photo manager %define name smeserver-photos Name: %{name} %define version 0.1 %define release 2 Version: %{version} Release: %{release}%{?dist} License: GPL URL: http://acenet-tech.org/sme Group: SME Server/addon Source: %{name}-%{version}.tar.gz BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} Requires: e-smith-release >= 7.0 Requires: photos BuildRequires: e-smith-devtools AutoReqProv: no %description smserver rpm to integrate photos digital photo manager into SME %changelog * Fri Mar 02 2007 Craig D. Jensen - Name change to reflect SME rpm builds. Added GPG signature * Mon Dec 18 2006 Craig D. Jensen - initial release - [4.1-1] %prep %setup %build #perl createlinks mkdir -p root/etc/e-smith/db/accounts/defaults/photos echo "reserved" > root/etc/e-smith/db/accounts/defaults/photos/type mkdir -p root/etc/e-smith/db/configuration/defaults/photos echo "Digital Photo Manager" > root/etc/e-smith/db/configuration/defaults/photos/Name echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/photos/PublicAccess echo "photomanager" > root/etc/e-smith/db/configuration/defaults/photos/URL %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post /etc/e-smith/events/actions/initialize-default-databases /sbin/e-smith/expand-template /etc/e-smith/sql/init/80photos.sql /etc/rc.d/init.d/mysql.init start /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith echo "" echo "Go to:" echo "acenet-tech.org/sme/smecontrib.php" echo "current settings 'config show photos'..." /sbin/e-smith/config show photos %postun #uninstall if [ $1 = 0 ] ; then /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)