/[packages]/backports/5/owncloud/current/SPECS/owncloud.spec
ViewVC logotype

Contents of /backports/5/owncloud/current/SPECS/owncloud.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1060819 - (show annotations) (download)
Fri Oct 14 20:27:36 2016 UTC (7 years, 9 months ago) by zezinho
File size: 5235 byte(s)
- bundle new cert file - recommends php-opcache as it is recommended in the documentation
1 %define version 8.1.10
2 %define rel 2
3 %define prerel %{nil}
4
5 %if "%{prerel}" != "%{nil}"
6 %define lc_prerel %(echo %{prerel} | tr "A-Z" "a-z")
7 %define release %mkrel 1.%{lc_prerel}.%{rel}
8 %else
9 %define release %mkrel %{rel}
10 %endif
11
12 # exclude 3rd party library from dependencies scanning
13 %global __requires_exclude_from ^%{_datadir}/%{name}/3rdparty/
14 %global __provides_exclude_from ^%{_datadir}/%{name}/3rdparty/
15 # exclude remaining PHP dependencies as long as their usage is not proven
16 %global __requires_exclude pear\\(.*\\)
17 %define __jar_repack %{nil}
18
19 Summary: Open personal cloud
20 Name: owncloud
21 Version: %{version}
22 Release: %{release}
23 Source0: http://download.owncloud.org/community/%{name}-%{version}%{?prerel}.tar.bz2
24 License: AGPLv3
25 Group: Monitoring
26 Url: http://owncloud.org/
27 Requires: apache-mod_php
28 Requires: php-zip
29 Requires: php-mbstring
30 Requires: php-gd
31 Requires: php-curl
32 Requires: php-iconv
33 Recommends: php-sqlite3 php-pdo_sqlite php-opcache
34 BuildArch: noarch
35
36 %description
37 A personal cloud server which runs on you personal server
38 and enables accessing your data from everywhere and sharing
39 with other people.
40
41 %prep
42 %setup -q -n %{name}
43
44 %install
45 mkdir -p %{buildroot}%{_datadir}/%{name}
46 cp -pr * %{buildroot}%{_datadir}/%{name}
47
48 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
49 mv %{buildroot}%{_datadir}/%{name}/config/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name}
50 rm -rf %{buildroot}%{_datadir}/%{name}/config
51 rm -f %{buildroot}%{_datadir}/%{name}/AUTHORS
52 rm -f %{buildroot}%{_datadir}/%{name}/COPYING-AGPL
53 rm -f %{buildroot}/.htaccess
54
55 mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
56 pushd %{buildroot}%{_datadir}/%{name}
57 ln -s ../../..%{_sysconfdir}/%{name} config
58 ln -s ../../..%{_localstatedir}/lib/%{name} data
59 popd
60
61 # make config and apps directory apache-writable
62 chmod 775 %{buildroot}%{_sysconfdir}/%{name}
63 chmod 775 %{buildroot}%{_datadir}/%{name}/apps
64
65 mkdir -p %{buildroot}%{webappconfdir}
66 cat > %{buildroot}%{webappconfdir}/%{name}.conf <<EOF
67 # %{name} configuration
68 Alias /%{name} %{_datadir}/%{name}
69
70 <Directory %{_datadir}/%{name}>
71 <IfModule mod_authz_core.c>
72 # Apache 2.4
73 Require all granted
74 </IfModule>
75 <IfModule !mod_authz_core.c>
76 # Apache 2.2
77 Order allow,deny
78 Allow from all
79 </IfModule>
80
81 AddDefaultCharset utf-8
82 php_value upload_max_filesize 513M
83 php_value post_max_size 513M
84 php_value memory_limit 512M
85 php_value mbstring.func_overload 0
86 php_value always_populate_raw_post_data -1
87
88 <IfModule mod_fcgid.c>
89 <IfModule mod_setenvif.c>
90 <IfModule mod_headers.c>
91 SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
92 RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
93 </IfModule>
94 </IfModule>
95 </IfModule>
96
97 <IfModule mod_rewrite.c>
98 RewriteEngine on
99 RewriteBase /owncloud
100 RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
101 RewriteRule ^\.well-known/host-meta public.php?service=host-meta [QSA,L]
102 RewriteRule ^\.well-known/host-meta\.json public.php?service=host-meta-json [QSA,L]
103 RewriteRule ^\.well-known/carddav remote.php/carddav/ [R]
104 RewriteRule ^\.well-known/caldav remote.php/caldav/ [R]
105 RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
106 RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
107 RewriteRule ^remote/(.*) remote.php [QSA,L]
108 </IfModule>
109 </Directory>
110
111 <Directory %{_datadir}/%{name}/data>
112 <IfModule mod_authz_core.c>
113 # Apache 2.4
114 Require all denied
115 </IfModule>
116 <IfModule !mod_authz_core.c>
117 # Apache 2.2
118 Order Deny,Allow
119 Deny from All
120 Allow from None
121 </IfModule>
122 </Directory>
123 EOF
124
125 cat > %{buildroot}%_datadir/%name/.htaccess <<EOF
126 # Version: %{version}
127 EOF
128
129 %pretrans
130 if [ -e %{_datadir}/%{name}/data -a ! -L %{_datadir}/%{name}/data ]; then
131 mv %{_datadir}/%{name}/data %{_localstatedir}/lib/%{name}
132 pushd %{_datadir}/%{name}
133 ln -s ../../..%{_localstatedir}/lib/%{name} data
134 popd
135 fi
136 if [ -e %{_datadir}/%{name}/config -a ! -L %{_datadir}/%{name}/config ]; then
137 mv %{_datadir}/%{name}/config %{_sysconfdir}/%{name}
138 pushd %{_datadir}/%{name}
139 ln -s ../../..%{_sysconfdir}/%{name} config
140 popd
141 fi
142
143 %files
144 %doc AUTHORS COPYING-AGPL config/config.sample.php
145 %dir %{_datadir}/%{name}
146 %{_datadir}/%{name}/3rdparty
147 %{_datadir}/%{name}/core
148 %{_datadir}/%{name}/config
149 %{_datadir}/%{name}/data
150 %{_datadir}/%{name}/lib
151 %{_datadir}/%{name}/l10n
152 %{_datadir}/%{name}/occ
153 %{_datadir}/%{name}/ocs
154 %{_datadir}/%{name}/ocs-provider
155 %{_datadir}/%{name}/settings
156 %{_datadir}/%{name}/themes
157 %{_datadir}/%{name}/*.php
158 %{_datadir}/%{name}/db_structure.xml
159 %{_datadir}/%{name}/indie.json
160 %{_datadir}/%{name}/index.html
161 %{_datadir}/%{name}/robots.txt
162 %_datadir/%name/.htaccess
163 %attr(-,root,apache) %{_datadir}/%{name}/apps
164 %attr(-,root,apache) %{_sysconfdir}/%{name}
165 %attr(-,root,apache) %{_sysconfdir}/%{name}/ca-bundle.crt
166 %attr(-,apache,apache) %{_localstatedir}/lib/%{name}
167 %config(noreplace) %{webappconfdir}/%{name}.conf

  ViewVC Help
Powered by ViewVC 1.1.30