"Fossies" - the Fresh Open Source Software Archive

Member "sqwebmail-6.0.3/sqwebmail.lpspec" (29 Aug 2019, 5915 Bytes) of package /linux/www/sqwebmail-6.0.3.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "sqwebmail.lpspec": 6.0.2_vs_6.0.3.

    1 #
    2 # Copyright 2005-2010 Double Precision, Inc.  See COPYING for
    3 # distribution information.
    4 
    5 
    6 %define is_not_mandrake %(test ! -e /etc/mandrake-release && echo 1 || echo 0)
    7 
    8 %{expand:%%define apachedir %(if test -d /home/httpd ; then echo /home/httpd ; else echo /var/www ; fi)}
    9 
   10 %define	cgibindir		%{apachedir}/cgi-bin
   11 %define imagedir		%{apachedir}/html/webmail
   12 %define	imageurl		/webmail
   13 
   14 %define	cacheowner		bin
   15 %define cachedir		%{_localstatedir}/webmail-logincache
   16 
   17 %{expand:%%define initdir %(if test -d /etc/init.d/. ; then echo /etc/init.d ; else echo /etc/rc.d/init.d ; fi)}
   18 
   19 Name: sqwebmail
   20 Version: 6.0.3
   21 Release: 1
   22 Source: http://download.sourceforge.net/courier/sqwebmail-6.0.3.tar.bz2
   23 BuildRequires: rpm >= 4.0.2 fileutils grep perl
   24 BuildRequires: %(which gpg 2>/dev/null && echo 'gnupg >= 1.0.5' && exit 0; echo gnupg2)
   25 BuildRequires: courier-authlib-devel >= 0.55
   26 BuildRequires: openldap-devel /etc/mime.types
   27 BuildRequires: libidn-devel
   28 BuildRequires: courier-unicode-devel
   29 
   30 %{?repository: Repository(pgpkeys.txt): http://download.lpmtool.com//sqwebmail}
   31 
   32 %package
   33 Summary: SqWebMail webmail server
   34 Requires: /bin/systemctl /etc/cron.hourly expect
   35 Requires: %(which gpg 2>/dev/null && echo 'gnupg >= 1.0.5' && exit 0; echo gnupg2)
   36 
   37 %if %is_not_mandrake
   38 Requires: %{cgibindir}
   39 %endif
   40 
   41 SqWebMail is a Webmail CGI for Maildir mailboxes.
   42 
   43 %package ldap
   44 Requires: %{__name} = %{__version}-%{__release}
   45 
   46 This package installes the SqWebMail LDAP address book lookup module.
   47 
   48 %define _prefix /usr/lib/sqwebmail
   49 %define _sysconfdir %{_prefix}/etc
   50 %define _mandir %{_prefix}/man
   51 
   52 %define scriptdir %{_datadir}/sqwebmail
   53 %define htmldir %{_datadir}/sqwebmail/html
   54 
   55 %begin
   56 %setup
   57 %configure \
   58 	--enable-cgibindir=%{cgibindir} \
   59 	--enable-imagedir=%{imagedir} \
   60 	--enable-imageurl=%{imageurl} \
   61 	--with-cachedir=%{cachedir} \
   62 	--with-cacheowner=%{cacheowner} \
   63 	%{?xflags: %{xflags}}
   64 
   65 %begin build
   66 %{__make} %{_smp_mflags}
   67 %{__make} check
   68 %begin install
   69 %{__make} install DESTDIR=$__installdir
   70 %{__mkdir} -p $__installdir/etc/pam.d
   71 %{__install} -m 0444 libs/sqwebmail/webmail.authpam $__installdir/etc/pam.d/webmail
   72 %{__install} -m 0444 libs/sqwebmail/webmail.authpam $__installdir/etc/pam.d/calendar
   73 
   74 %{__rm} $__installdir%{htmldir}/en || exit 1
   75 # Drop the soft link -> en_us, this is taken care of by post script.
   76 
   77 %{__mkdir} -p $__installdir/etc/cron.hourly
   78 %{__cat} >$__installdir/etc/cron.hourly/sqwebmail-cron-cleancache <<EOF
   79 #!/bin/sh
   80 
   81 su - %{cacheowner} -s /bin/sh -c %{scriptdir}/cleancache.pl
   82 EOF
   83 
   84 #
   85 # Red Hat /etc/profile.d scripts
   86 #
   87 
   88 %{__mkdir} -p $__installdir/etc/profile.d
   89 %{__cat} >$__installdir/etc/profile.d/sqwebmail.sh <<EOF
   90 if echo "\$MANPATH" | tr ':' '\012' | fgrep -qx %{_mandir}
   91 then
   92 	:
   93 else
   94 	MANPATH="%{_mandir}:\$MANPATH"
   95 	export MANPATH
   96 
   97 	if test -w /etc
   98 	then
   99 		PATH="%{_sbindir}:\$PATH"
  100 	fi
  101 	export PATH
  102 fi
  103 EOF
  104 
  105 %{__cat} >$__installdir/etc/profile.d/sqwebmail.csh <<EOF
  106 
  107 if ( \$?MANPATH ) then
  108 	true
  109 else
  110 	setenv MANPATH ""
  111 endif
  112 
  113 echo "\$MANPATH" | tr ':' '\012' | fgrep -qx %{_mandir}
  114 
  115 if ( \$? ) then
  116 	true
  117 else
  118 	setenv MANPATH "%{_mandir}:\$MANPATH"
  119 	test -w /etc
  120 	if ( \$? ) then
  121 		true
  122         else
  123 		setenv PATH "%{_sbindir}:\$PATH"
  124 	endif
  125 endif
  126 EOF
  127 
  128 #
  129 # Red Hat init.d file
  130 #
  131 
  132 %{__mkdir} -p $__installdir/lib/systemd/system
  133 
  134 %{__cat} >$__installdir/lib/systemd/system/sqwebmail.service <<EOF
  135 [Unit]
  136 Description=SqWebMail
  137 Wants=network.target
  138 Wants=courier-authlib.service
  139 Wants=mail-transfer-agent.target
  140 After=network.target
  141 After=courier-authlib.service
  142 After=mail-transfer-agent.target
  143 
  144 [Install]
  145 WantedBy=multi-user.target
  146 
  147 [Service]
  148 Type=forking
  149 RemainAfterExit=true
  150 ExecStart=%{_libexecdir}/sqwebmaild.rc start
  151 ExecStop=%{_libexecdir}/sqwebmaild.rc stop
  152 EOF
  153 
  154 %{__cp} sysconftool $__installdir%{scriptdir}/sysconftool
  155 
  156 %{__cp} libs/pcp/README.html pcp_README.html
  157 
  158 . libs/pcp/uids
  159 echo '%attr(-, ' "$localcacheowner, $mailgroup) $calendardir" >filelist
  160 
  161 (
  162 courierauthconfig --configfiles >configtmp || exit 1
  163 . ./configtmp
  164 echo '%attr(-, '"$mailuser, $mailgroup" ') %{_libexecdir}' >>filelist
  165 ) || exit 1
  166 
  167 ls $RPM_BUILD_ROOT%{scriptdir} | grep -v ldapsearch | sed 's:^:%attr(555, root, root) %{scriptdir}/:' >>filelist
  168 %post
  169 
  170 test -d %{htmldir}/en || ln -fs en-us %{htmldir}/en
  171 
  172 if test -f %{initdir}/sqwebmail
  173 then
  174 	/sbin/chkconfig --del sqwebmail
  175 	/bin/systemctl stop sqwebmail.service
  176 fi
  177 
  178 %{scriptdir}/sysconftool %{_sysconfdir}/*.dist >/dev/null
  179 
  180 /bin/systemctl daemon-reload || :
  181 /bin/systemctl enable sqwebmail.service &> /dev/null || :
  182 
  183 %{scriptdir}/sysconftool %{_sysconfdir}/*.dist >/dev/null
  184 
  185 /bin/systemctl daemon-reload || :
  186 /bin/systemctl enable sqwebmail.service &> /dev/null || :
  187 
  188 %preun
  189 
  190 if test "$1" = 0
  191 then
  192 	/bin/systemctl stop sqwebmail.service
  193 	/bin/systemctl disable sqwebmail.service
  194 
  195 fi
  196 
  197 %postun
  198 test -d %{htmldir}/en || %{__rm} -f %{htmldir}/en
  199 
  200 if test "$1" != 0
  201 then
  202 	/bin/systemctl try-restart sqwebmail.service || :
  203 fi
  204 
  205 %files -f filelist
  206 %defattr(-, root, bin)
  207 %dir %{_prefix}
  208 
  209 %if %{expand: %%{=_prefix: %{_exec_prefix}}}
  210 
  211 %else
  212 %dir %{_exec_prefix}
  213 %endif
  214 
  215 %attr(555, root, root) %dir %{scriptdir}
  216 %dir %{_sysconfdir}
  217 %{_sysconfdir}/*.dist
  218 
  219 %{cgibindir}/*
  220 %{imagedir}
  221 %{_sbindir}
  222 %{_mandir}
  223 
  224 %attr(644, root, root) /lib/systemd/system/*
  225 
  226 %attr(700, %{cacheowner}, bin) %{cachedir}
  227 %attr(644, root, root) %config(noreplace) /etc/pam.d/*
  228 
  229 %attr(755, bin, bin) /etc/cron.hourly/sqwebmail-cron-cleancache
  230 %attr(755, bin, bin) /etc/profile.d/sqwebmail.sh
  231 %attr(755, bin, bin) /etc/profile.d/sqwebmail.csh
  232 
  233 %attr(-, bin, bin) %doc AUTHORS libs/sqwebmail/BUGS COPYING INSTALL NEWS README libs/sqwebmail/SECURITY libs/sqwebmail/TODO libs/gpglib/README.html
  234 %attr(-, bin, bin) %doc libs/sqwebmail/BUGS.html INSTALL.html NEWS README.html libs/sqwebmail/SECURITY.html libs/sqwebmail/TODO.html libs/sqwebmail/ChangeLog pcp_README.html
  235 %attr(-, bin, bin) %doc libs/maildir/README*.html
  236 
  237 %files ldap
  238 %attr(755, root, root) %{scriptdir}/ldapsearch