]> git.pld-linux.org Git - packages/ct-crm.git/blob - ct-crm.spec
- more translations
[packages/ct-crm.git] / ct-crm.spec
1 # TODO:
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
6 Name:           ct-crm
7 Version:        1.6
8 %define         _pre    pre
9 Release:        0.%{_pre}.1.2
10 License:        GPL
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
15 Source2:        %{name}.conf
16 Patch0:         %{name}-lang_pl.patch
17 URL:            http://www.customer-touch.com/
18 Requires:       php-mysql
19 Requires:       webserver
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _cthtmldir      %{_datadir}/%{name}
24
25 %description
26 An easy to use and install CRM for small to medium firms.
27
28 %description -l pl
29 Prosty w u¿yciu i instalacji CRM (Customer Relationship Management)
30 dla ma³ych i ¶rednch instytucji.
31
32 %prep
33 %setup -q -n %{name}%{version}
34 %patch0 -p1
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT{%{_cthtmldir}/{Doc/manual_install,languages/polish},/etc/httpd}
39
40 for i in uploads modules languages includes images email ; do
41         cp -Rf $i $RPM_BUILD_ROOT%{_cthtmldir}
42 done
43 install *.php *.js *.css $RPM_BUILD_ROOT%{_cthtmldir}
44 cp -Rf Doc/manual_install/* $RPM_BUILD_ROOT%{_cthtmldir}/Doc/manual_install
45
46 install Doc/manual_install/config.inc.php $RPM_BUILD_ROOT%{_cthtmldir}
47
48 install %{SOURCE1} $RPM_BUILD_ROOT%{_cthtmldir}/languages/polish/global.inc.php
49 install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
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
57 fi
58 if [ -f /var/lock/subsys/httpd ]; then
59         /usr/sbin/apachectl restart 1>&2
60 fi
61
62 %preun
63 if [ "$1" = "0" ]; then
64         umask 027
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
70         fi
71 fi
72
73 %files
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
78 %dir %{_cthtmldir}
79 %{_cthtmldir}/*.css
80 %{_cthtmldir}/[!^c]*.php
81 %{_cthtmldir}/c[asu]*.php
82 %{_cthtmldir}/*.js
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
This page took 0.04588 seconds and 3 git commands to generate.