/[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 1108142 - (show annotations) (download)
Wed Jun 21 20:38:33 2017 UTC (6 years, 11 months ago) by zezinho
File size: 5272 byte(s)
SILENT : bump rel to replace the package cleared in the mirrors by nextcloud
1 %define version 9.1.5
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-fileinfo
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 rm -rf %{buildroot}%{_datadir}/%{name}/config
49 rm -f %{buildroot}%{_datadir}/%{name}/AUTHORS
50 rm -f %{buildroot}%{_datadir}/%{name}/COPYING-AGPL
51 rm -f %{buildroot}/.htaccess
52
53 ca_bundle=%{buildroot}%{_datadir}/%{name}/resources/config/ca-bundle.crt
54 rm -f $ca_bundle
55 ln -s ../../../../../etc/pki/tls/certs/ca-bundle.crt $ca_bundle
56
57 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
58 mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
59 pushd %{buildroot}%{_datadir}/%{name}
60 ln -s ../../..%{_sysconfdir}/%{name} config
61 ln -s ../../..%{_localstatedir}/lib/%{name} data
62 popd
63
64 # make config and apps directory apache-writable
65 chmod 775 %{buildroot}%{_sysconfdir}/%{name}
66 chmod 775 %{buildroot}%{_datadir}/%{name}/apps
67
68 mkdir -p %{buildroot}%{webappconfdir}
69 cat > %{buildroot}%{webappconfdir}/%{name}.conf <<EOF
70 # %{name} configuration
71 Alias /%{name} %{_datadir}/%{name}
72
73 <Directory %{_datadir}/%{name}>
74 <IfModule mod_authz_core.c>
75 # Apache 2.4
76 Require all granted
77 </IfModule>
78 <IfModule !mod_authz_core.c>
79 # Apache 2.2
80 Order allow,deny
81 Allow from all
82 </IfModule>
83
84 AddDefaultCharset utf-8
85 php_value upload_max_filesize 513M
86 php_value post_max_size 513M
87 php_value memory_limit 512M
88 php_value mbstring.func_overload 0
89 php_value always_populate_raw_post_data -1
90
91 <IfModule mod_fcgid.c>
92 <IfModule mod_setenvif.c>
93 <IfModule mod_headers.c>
94 SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
95 RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
96 </IfModule>
97 </IfModule>
98 </IfModule>
99
100 <IfModule mod_rewrite.c>
101 RewriteEngine on
102 RewriteBase /owncloud
103 RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
104 RewriteRule ^\.well-known/host-meta public.php?service=host-meta [QSA,L]
105 RewriteRule ^\.well-known/host-meta\.json public.php?service=host-meta-json [QSA,L]
106 RewriteRule ^\.well-known/carddav remote.php/carddav/ [R]
107 RewriteRule ^\.well-known/caldav remote.php/caldav/ [R]
108 RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
109 RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
110 RewriteRule ^remote/(.*) remote.php [QSA,L]
111 </IfModule>
112 </Directory>
113
114 <Directory %{_datadir}/%{name}/data>
115 <IfModule mod_authz_core.c>
116 # Apache 2.4
117 Require all denied
118 </IfModule>
119 <IfModule !mod_authz_core.c>
120 # Apache 2.2
121 Order Deny,Allow
122 Deny from All
123 Allow from None
124 </IfModule>
125 </Directory>
126 EOF
127
128 cat > %{buildroot}%_datadir/%name/.htaccess <<EOF
129 # Version: %{version}
130 EOF
131
132 %pretrans
133 if [ -e %{_datadir}/%{name}/data -a ! -L %{_datadir}/%{name}/data ]; then
134 mv %{_datadir}/%{name}/data %{_localstatedir}/lib/%{name}
135 pushd %{_datadir}/%{name}
136 ln -s ../../..%{_localstatedir}/lib/%{name} data
137 popd
138 fi
139 if [ -e %{_datadir}/%{name}/config -a ! -L %{_datadir}/%{name}/config ]; then
140 mv %{_datadir}/%{name}/config %{_sysconfdir}/%{name}
141 pushd %{_datadir}/%{name}
142 ln -s ../../..%{_sysconfdir}/%{name} config
143 popd
144 fi
145
146 %files
147 %doc AUTHORS COPYING-AGPL config/config.sample.php
148 %dir %{_datadir}/%{name}
149 %{_datadir}/%{name}/3rdparty
150 %{_datadir}/%{name}/core
151 %{_datadir}/%{name}/config
152 %{_datadir}/%{name}/data
153 %{_datadir}/%{name}/lib
154 %{_datadir}/%{name}/l10n
155 %{_datadir}/%{name}/occ
156 %{_datadir}/%{name}/ocs
157 %{_datadir}/%{name}/ocs-provider
158 %{_datadir}/%{name}/resources
159 %{_datadir}/%{name}/settings
160 %{_datadir}/%{name}/themes
161 %{_datadir}/%{name}/updater
162 %{_datadir}/%{name}/*.php
163 %{_datadir}/%{name}/db_structure.xml
164 %{_datadir}/%{name}/index.html
165 %{_datadir}/%{name}/robots.txt
166 %{_datadir}/%{name}/.htaccess
167 %attr(-,root,apache) %{_datadir}/%{name}/apps
168 %attr(-,root,apache) %{_sysconfdir}/%{name}
169 %attr(-,apache,apache) %{_localstatedir}/lib/%{name}
170 %config(noreplace) %{webappconfdir}/%{name}.conf

  ViewVC Help
Powered by ViewVC 1.1.30