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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1108142 - (hide annotations) (download)
Wed Jun 21 20:38:33 2017 UTC (7 years ago) by zezinho
File size: 5272 byte(s)
SILENT : bump rel to replace the package cleared in the mirrors by nextcloud
1 zezinho 1107793 %define version 9.1.5
2 zezinho 1108142 %define rel 2
3 blino 658220 %define prerel %{nil}
4    
5     %if "%{prerel}" != "%{nil}"
6 blino 651401 %define lc_prerel %(echo %{prerel} | tr "A-Z" "a-z")
7 tv 733995 %define release %mkrel 1.%{lc_prerel}.%{rel}
8 blino 658220 %else
9     %define release %mkrel %{rel}
10     %endif
11    
12 guillomovitch 797597 # 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 neoclust 404149 %define __jar_repack %{nil}
18 dmorgan 270869
19 ennael 80476 Summary: Open personal cloud
20 neoclust 453943 Name: owncloud
21 blino 658220 Version: %{version}
22     Release: %{release}
23     Source0: http://download.owncloud.org/community/%{name}-%{version}%{?prerel}.tar.bz2
24 ennael 80476 License: AGPLv3
25     Group: Monitoring
26     Url: http://owncloud.org/
27     Requires: apache-mod_php
28 dmorgan 168407 Requires: php-zip
29 dmorgan 168408 Requires: php-mbstring
30 blino 271042 Requires: php-gd
31 juancho 296998 Requires: php-curl
32 neoclust 400236 Requires: php-iconv
33 zezinho 1063693 Recommends: php-sqlite3 php-pdo_sqlite php-fileinfo
34 ennael 80476 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 luigiwalser 618995 %setup -q -n %{name}
43 ennael 80476
44     %install
45 guillomovitch 797597 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 zezinho 1063693 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 zezinho 1062956
57 zezinho 1063693 mkdir -p %{buildroot}%{_sysconfdir}/%{name}
58 guillomovitch 797597 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 dmorgan 228154 popd
63 ennael 80476
64 guillomovitch 797597 # make config and apps directory apache-writable
65     chmod 775 %{buildroot}%{_sysconfdir}/%{name}
66     chmod 775 %{buildroot}%{_datadir}/%{name}/apps
67 ennael 80476
68 luigiwalser 618995 mkdir -p %{buildroot}%{webappconfdir}
69     cat > %{buildroot}%{webappconfdir}/%{name}.conf <<EOF
70 ennael 80476 # %{name} configuration
71 guillomovitch 797597 Alias /%{name} %{_datadir}/%{name}
72    
73     <Directory %{_datadir}/%{name}>
74 oden 463808 <IfModule mod_authz_core.c>
75 guillomovitch 797597 # Apache 2.4
76     Require all granted
77 oden 463808 </IfModule>
78     <IfModule !mod_authz_core.c>
79 guillomovitch 797597 # Apache 2.2
80     Order allow,deny
81     Allow from all
82 oden 463808 </IfModule>
83 guillomovitch 797597
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 neoclust 821264 php_value always_populate_raw_post_data -1
90 guillomovitch 797597
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 neoclust 860938 RewriteBase /owncloud
103 guillomovitch 797597 RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
104 neoclust 860938 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 guillomovitch 797597 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 ennael 80476 </Directory>
113 guillomovitch 797597
114     <Directory %{_datadir}/%{name}/data>
115 oden 463808 <IfModule mod_authz_core.c>
116 guillomovitch 797597 # Apache 2.4
117     Require all denied
118 oden 463808 </IfModule>
119     <IfModule !mod_authz_core.c>
120 guillomovitch 797597 # Apache 2.2
121     Order Deny,Allow
122     Deny from All
123     Allow from None
124 oden 463808 </IfModule>
125 zezinho 403914 </Directory>
126 ennael 80476 EOF
127 guillomovitch 797597
128 neoclust 821263 cat > %{buildroot}%_datadir/%name/.htaccess <<EOF
129 neoclust 860938 # Version: %{version}
130 neoclust 821263 EOF
131    
132 guillomovitch 797597 %pretrans
133 luigiwalser 797685 if [ -e %{_datadir}/%{name}/data -a ! -L %{_datadir}/%{name}/data ]; then
134 guillomovitch 797597 mv %{_datadir}/%{name}/data %{_localstatedir}/lib/%{name}
135     pushd %{_datadir}/%{name}
136     ln -s ../../..%{_localstatedir}/lib/%{name} data
137     popd
138     fi
139 blino 798069 if [ -e %{_datadir}/%{name}/config -a ! -L %{_datadir}/%{name}/config ]; then
140 guillomovitch 797597 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 zezinho 1060790 %{_datadir}/%{name}/ocs-provider
158 zezinho 1062956 %{_datadir}/%{name}/resources
159 guillomovitch 797597 %{_datadir}/%{name}/settings
160     %{_datadir}/%{name}/themes
161 zezinho 1063693 %{_datadir}/%{name}/updater
162 guillomovitch 797597 %{_datadir}/%{name}/*.php
163     %{_datadir}/%{name}/db_structure.xml
164     %{_datadir}/%{name}/index.html
165     %{_datadir}/%{name}/robots.txt
166 zezinho 1063693 %{_datadir}/%{name}/.htaccess
167 guillomovitch 797597 %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