]>
Commit | Line | Data |
---|---|---|
e770a8b9 AF |
1 | #TODO: |
2 | # - make package for libs from 3rdparty dir: | |
3 | # - aws-sdk http://aws.amazon.com/sdkforphp | |
4 | # - dropbox-php http://www.dropbox-php.com/ | |
5 | # - jquery-minicolors https://github.com/claviska/jquery-miniColors/ | |
6 | # - phpMyID http://siege.org/projects/phpMyID | |
7 | # - php-pear-OS_Guess | |
8 | # - phpass http://www.openwall.com/phpass/ | |
9 | # - php-cloudfiles https://github.com/rackspace/php-cloudfiles | |
10 | # - simpletest http://simpletest.org/en/download.html | |
11 | # - smb4php http://www.phpclasses.org/smb4php | |
12 | # - jquery-timepicker http://fgelinas.com/code/timepicker | |
13 | # - sabredav - https://code.google.com/p/sabredav/ | |
89b77f4a AF |
14 | Summary: Private file sync and share server |
15 | Name: owncloud | |
f1d5190a | 16 | Version: 4.5.2 |
56b22c21 | 17 | Release: 1 |
89b77f4a AF |
18 | License: AGPL v3, MIT |
19 | Group: Applications/WWW | |
20 | Source0: http://owncloud.org/releases/%{name}-%{version}.tar.bz2 | |
f1d5190a | 21 | # Source0-md5: a23cd7567a35d7c0d3b5e50566ca3853 |
89b77f4a | 22 | Source1: config.php |
83880b0e AF |
23 | Source2: apache.conf |
24 | Source3: lighttpd.conf | |
89b77f4a AF |
25 | Patch0: system-pear.patch |
26 | URL: http://owncloud.org | |
27 | BuildRequires: rpmbuild(macros) >= 1.268 | |
e770a8b9 AF |
28 | Requires: getid3 |
29 | Requires: php(core) >= 5.3 | |
89b77f4a AF |
30 | Requires: php(gd) |
31 | Requires: php(mbstring) | |
32 | Requires: php(pdo) | |
33 | Requires: php(pdo-sqlite) | |
34 | Requires: php(posix) | |
35 | Requires: php(sqlite3) | |
36 | Requires: php(xml) | |
37 | Requires: php(zip) | |
e770a8b9 | 38 | Requires: php(zlib) |
89b77f4a AF |
39 | #Requires: php-When |
40 | Requires: php-pear-Archive_Tar | |
41 | Requires: php-pear-Console_Getopt | |
42 | Requires: php-pear-Crypt_Blowfish | |
43 | Requires: php-pear-MDB2 | |
44 | Requires: php-pear-MDB2_Driver_mysql | |
45 | Requires: php-pear-MDB2_Driver_pgsql | |
46 | Requires: php-pear-MDB2_Driver_sqlite | |
47 | Requires: php-pear-MDB2_Schema | |
48 | Requires: php-pear-PEAR-core | |
49 | Requires: php-pear-XML_Parser | |
50 | Requires: php-phpmailer >= 5.2 | |
51 | #Requires: php-sabredav-Sabre_CalDAV | |
52 | #Requires: php-sabredav-Sabre_CardDAV | |
53 | Requires: webapps | |
54 | Requires: webserver(access) | |
55 | Requires: webserver(alias) | |
56 | Requires: webserver(php) | |
57 | Requires: webserver(rewrite) | |
58 | Suggests: php(mysql) | |
59 | Suggests: php(pdo-mysql) | |
60 | Suggests: php(pdo-pgsql) | |
61 | Suggests: php(pgsql) | |
62 | BuildArch: noarch | |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %define _appdir %{_datadir}/%{name} | |
66 | %define _webapps /etc/webapps | |
67 | %define _webapp %{name} | |
68 | %define _sysconfdir %{_webapps}/%{_webapp} | |
69 | ||
70 | %description | |
71 | ownCloud Server provides you a private file sync and share cloud. Host | |
72 | this server to easily sync business or private documents across all | |
73 | your devices, and share those documents with other users of your | |
74 | ownCloud server on their devices. | |
75 | ||
76 | %prep | |
77 | %setup -q -n %{name} | |
78 | %patch0 -p1 | |
79 | ||
89b77f4a | 80 | # remove bundled 3rdparty libs |
e770a8b9 | 81 | %{__rm} -r 3rdparty/{class.phpmailer.php,class.smtp.php,getid3,Archive,Console,Crypt_Blowfish,MDB2,MDB2.php,XML} |
89b77f4a AF |
82 | # PEAR-core |
83 | %{__rm} -r 3rdparty/{PEAR.php,PEAR5.php,System.php,PEAR} | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/config,%{_appdir}} | |
88 | ||
89 | cp -pdR *.php db_structure.xml 3rdparty apps core files l10n lib ocs search settings themes $RPM_BUILD_ROOT/%{_appdir} | |
90 | ln -s %{_sysconfdir}/config $RPM_BUILD_ROOT%{_appdir}/config | |
91 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/config/config.php | |
92 | ||
83880b0e AF |
93 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
94 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
95 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
89b77f4a AF |
96 | |
97 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name} | |
98 | ||
99 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
100 | %webapp_register apache %{_webapp} | |
101 | ||
102 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
103 | %webapp_unregister apache %{_webapp} | |
104 | ||
105 | %triggerin -- apache < 2.2.0, apache-base | |
106 | %webapp_register httpd %{_webapp} | |
107 | ||
108 | %triggerun -- apache < 2.2.0, apache-base | |
109 | %webapp_unregister httpd %{_webapp} | |
110 | ||
111 | %triggerin -- lighttpd | |
112 | %webapp_register lighttpd %{_webapp} | |
113 | ||
114 | %triggerun -- lighttpd | |
115 | %webapp_unregister lighttpd %{_webapp} | |
116 | ||
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS COPYING-AGPL COPYING-README README | |
123 | %dir %attr(750,root,http) %{_sysconfdir} | |
124 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
125 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
126 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
127 | %dir %attr(750,http,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config | |
128 | %attr(640,http,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config/*.php | |
129 | %{_appdir} | |
130 | %dir %attr(750,http,http) %{_localstatedir}/lib/%{name} |