]>
Commit | Line | Data |
---|---|---|
5fa146f9 | 1 | # TODO: |
5fa146f9 | 2 | # - make it work without global_variables=On |
e56f86fa | 3 | %define _pre pre |
1bad50d2 | 4 | %define _rel 3 |
5214d83d | 5 | Summary: A CRM for small to medium firms |
8938a75a | 6 | Summary(pl.UTF-8): CRM dla małych i średnich instytucji |
f00a7c20 | 7 | Name: ct-crm |
8 | Version: 1.6 | |
1bad50d2 | 9 | Release: 0.%{_pre}.%{_rel} |
f00a7c20 | 10 | License: GPL |
fce9a35f | 11 | Group: Applications/WWW |
5214d83d | 12 | Source0: http://dl.sourceforge.net/customer-touch/%{name}%{version}%{_pre}.zip |
f00a7c20 | 13 | # Source0-md5: ffe5c4e7b183173832f4c1157a645e05 |
14 | Source1: %{name}-polish_lang | |
5fa146f9 | 15 | Source2: %{name}.conf |
f00a7c20 | 16 | Patch0: %{name}-lang_pl.patch |
919c2e7f | 17 | Patch1: %{name}-dbz.patch |
18 | Patch2: %{name}-ne.patch | |
f00a7c20 | 19 | URL: http://www.customer-touch.com/ |
e56f86fa ER |
20 | BuildRequires: rpmbuild(macros) >= 1.268 |
21 | BuildRequires: sed >= 4.0 | |
8fa6ef48 | 22 | BuildRequires: unzip |
1bad50d2 | 23 | Requires: php(mysql) |
e56f86fa | 24 | Requires: webapps |
5fa146f9 | 25 | BuildArch: noarch |
f00a7c20 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
e56f86fa ER |
28 | %define _webapps /etc/webapps |
29 | %define _webapp %{name} | |
30 | %define _sysconfdir %{_webapps}/%{_webapp} | |
31 | %define _appdir %{_datadir}/%{_webapp} | |
fce9a35f | 32 | |
f00a7c20 | 33 | %description |
34 | An easy to use and install CRM for small to medium firms. | |
35 | ||
600e231b JR |
36 | %description -l pl.UTF-8 |
37 | Prosty w użyciu i instalacji CRM (Customer Relationship Management) | |
38 | dla małych i średnich instytucji. | |
f00a7c20 | 39 | |
40 | %prep | |
41 | %setup -q -n %{name}%{version} | |
42 | %patch0 -p1 | |
919c2e7f | 43 | %patch1 -p1 |
44 | %patch2 -p1 | |
f00a7c20 | 45 | |
c6f1ab1d ER |
46 | %{__sed} -i -e ' |
47 | s#"config.inc.php"#"%{_sysconfdir}/config.inc.php"# | |
48 | s#"includes/config.inc.php"#"%{_sysconfdir}/config.inc.php"# | |
49 | ' *.php */*.php | |
957a9ca6 | 50 | |
f00a7c20 | 51 | %install |
52 | rm -rf $RPM_BUILD_ROOT | |
8d4a2671 | 53 | install -d $RPM_BUILD_ROOT{%{_appdir}/{Doc/manual_install,languages/polish},/etc/httpd,%{_sysconfdir}} |
fce9a35f | 54 | |
c6f1ab1d | 55 | for i in uploads modules languages includes images email; do |
8d4a2671 | 56 | cp -Rf $i $RPM_BUILD_ROOT%{_appdir} |
f00a7c20 | 57 | done |
8d4a2671 ER |
58 | install *.php *.js *.css $RPM_BUILD_ROOT%{_appdir} |
59 | cp -Rf Doc/manual_install/* $RPM_BUILD_ROOT%{_appdir}/Doc/manual_install | |
f00a7c20 | 60 | |
8d4a2671 | 61 | touch $RPM_BUILD_ROOT%{_sysconfdir}/config.inc.php |
5fa146f9 | 62 | |
8d4a2671 | 63 | install %{SOURCE1} $RPM_BUILD_ROOT%{_appdir}/languages/polish/global.inc.php |
e56f86fa ER |
64 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
65 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
2e069a2b | 66 | |
f00a7c20 | 67 | %clean |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
2e069a2b | 72 | %doc Doc/*.txt Doc/{CHANGELOG,README} Doc/manual_install/readme |
e56f86fa ER |
73 | %dir %attr(750,root,http) %{_sysconfdir} |
74 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
75 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
76 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php | |
8d4a2671 ER |
77 | %dir %{_appdir} |
78 | %{_appdir}/*.css | |
79 | %{_appdir}/[!^c]*.php | |
80 | %{_appdir}/c[asu]*.php | |
81 | %{_appdir}/*.js | |
82 | %dir %{_appdir}/uploads | |
83 | %dir %{_appdir}/modules | |
84 | %{_appdir}/modules/mwhois | |
85 | %dir %{_appdir}/languages | |
86 | %{_appdir}/languages/*/global.inc.php | |
87 | %dir %{_appdir}/includes | |
88 | %{_appdir}/includes/*.php | |
89 | %dir %{_appdir}/images | |
90 | %{_appdir}/images/*.gif | |
91 | %dir %{_appdir}/email | |
92 | %{_appdir}/email/readme.txt | |
93 | %dir %{_appdir}/Doc | |
94 | %{_appdir}/Doc/manual_install |