2 # - move config to /etc
3 # - make it work without global_variables=On
4 Summary: A CRM for small to medium firms
5 Summary(pl): CRM dla ma³ych i ¶rednich instytucji
11 Group: Applications/WWW
12 Source0: http://dl.sourceforge.net/customer-touch/%{name}%{version}%{_pre}.zip
13 # Source0-md5: ffe5c4e7b183173832f4c1157a645e05
14 Source1: %{name}-polish_lang
16 Patch0: %{name}-lang_pl.patch
17 URL: http://www.customer-touch.com/
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _cthtmldir %{_datadir}/%{name}
26 An easy to use and install CRM for small to medium firms.
29 Prosty w u¿yciu i instalacji CRM (Customer Relationship Management)
30 dla ma³ych i ¶rednch instytucji.
33 %setup -q -n %{name}%{version}
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT%{_cthtmldir}/{Doc/manual_install,languages/polish}
40 for i in uploads modules languages includes images email ; do
41 cp -Rf $i $RPM_BUILD_ROOT%{_cthtmldir}
43 install *.php *.js *.css $RPM_BUILD_ROOT%{_cthtmldir}
44 cp -Rf Doc/manual_install/* $RPM_BUILD_ROOT%{_cthtmldir}/Doc/manual_install
46 install Doc/manual_install/config.inc.php $RPM_BUILD_ROOT%{_cthtmldir}
48 install %{SOURCE1} $RPM_BUILD_ROOT%{_cthtmldir}/languages/polish/global.inc.php
49 install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd
52 rm -rf $RPM_BUILD_ROOT
55 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
56 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
58 if [ -f /var/lock/subsys/httpd ]; then
59 /usr/sbin/apachectl restart 1>&2
63 if [ "$1" = "0" ]; then
65 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
66 /etc/httpd/httpd.conf.tmp
67 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
68 if [ -f /var/lock/subsys/httpd ]; then
69 /usr/sbin/apachectl restart 1>&2
74 %defattr(644,root,root,755)
75 %doc Doc/*.txt Doc/{CHANGELOG,README} Doc/manual_install/readme
76 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
77 %config(noreplace) %verify(not size mtime md5) %{_cthtmldir}/config.inc.php
80 %{_cthtmldir}/[!^c]*.php
81 %{_cthtmldir}/c[asu]*.php
83 %dir %{_cthtmldir}/uploads
84 %dir %{_cthtmldir}/modules
85 %{_cthtmldir}/modules/mwhois
86 %dir %{_cthtmldir}/languages
87 %{_cthtmldir}/languages/*/global.inc.php
88 %dir %{_cthtmldir}/includes
89 %{_cthtmldir}/includes/*.php
90 %dir %{_cthtmldir}/images
91 %{_cthtmldir}/images/*.gif
92 %dir %{_cthtmldir}/email
93 %{_cthtmldir}/email/readme.txt
94 %dir %{_cthtmldir}/Doc
95 %{_cthtmldir}/Doc/manual_install