]>
Commit | Line | Data |
---|---|---|
528f5eb1 | 1 | |
d8c1c0b3 | 2 | %define _mochiwebver r113 |
3 | %define _ibrowsever 2.1.2 | |
6d6ce29d | 4 | |
ec3f1cc9 ER |
5 | Summary: Apache CouchDB |
6 | Name: apache-couchdb | |
d8c1c0b3 | 7 | Version: 1.0.2 |
8 | Release: 0.1 | |
ec3f1cc9 ER |
9 | License: Apache v2.0 |
10 | Group: Applications | |
6d6ce29d | 11 | Source0: http://www.apache.org/dist/couchdb/%{version}/%{name}-%{version}.tar.gz |
d8c1c0b3 | 12 | # Source0-md5: 7ffbbe0f23f672181c89923c9f7a1de1 |
8ed0acf8 | 13 | Source1: %{name}.init |
6d6ce29d | 14 | URL: http://couchdb.apache.org/ |
ec3f1cc9 ER |
15 | BuildRequires: autoconf >= 2.59 |
16 | BuildRequires: automake >= 1.6.3 | |
528f5eb1 | 17 | BuildRequires: curl-devel |
6d6ce29d | 18 | BuildRequires: erlang >= 1:R12B5 |
ec3f1cc9 ER |
19 | BuildRequires: help2man |
20 | BuildRequires: js-devel | |
21 | BuildRequires: libicu-devel | |
22 | BuildRequires: libtool | |
528f5eb1 | 23 | BuildRequires: pkgconfig |
4fdf00cc ER |
24 | BuildRequires: rpmbuild(macros) >= 1.228 |
25 | Requires(post,preun): /sbin/chkconfig | |
26 | Requires(postun): /usr/sbin/groupdel | |
27 | Requires(postun): /usr/sbin/userdel | |
28 | Requires(pre): /bin/id | |
29 | Requires(pre): /usr/bin/getgid | |
30 | Requires(pre): /usr/sbin/groupadd | |
31 | Requires(pre): /usr/sbin/useradd | |
6d6ce29d | 32 | Requires: erlang >= 1:R12B5 |
8ed0acf8 | 33 | Requires: libicu-devel |
34 | Requires: pkgconfig | |
4fdf00cc ER |
35 | # these came from readme, need to check if these are really needed |
36 | #Requires: Mozilla-SpiderMonkey | |
37 | #Requires: gcc | |
38 | #Requires: make | |
39 | #Requires: openssl | |
40 | Provides: group(couchdb) | |
41 | Provides: user(couchdb) | |
ec3f1cc9 ER |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
45 | Apache CouchDB is a distributed, fault-tolerant and schema-free | |
46 | document-oriented database accessible via a RESTful HTTP/JSON API. | |
47 | Among other features, it provides robust, incremental replication with | |
48 | bi-directional conflict detection and resolution, and is queryable and | |
49 | indexable using a table-oriented view engine with JavaScript acting as | |
50 | the default view definition language. | |
51 | ||
52 | %prep | |
6d6ce29d | 53 | %setup -q |
ec3f1cc9 ER |
54 | |
55 | %build | |
6d6ce29d | 56 | |
4fdf00cc | 57 | %{__libtoolize} |
d8c1c0b3 | 58 | %{__aclocal} -I m4 |
4fdf00cc ER |
59 | %{__autoconf} |
60 | %{__autoheader} | |
61 | %{__automake} | |
ec3f1cc9 ER |
62 | %configure |
63 | %{__make} | |
64 | ||
6d6ce29d | 65 | |
ec3f1cc9 ER |
66 | %install |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | %{__make} install \ | |
69 | DESTDIR=$RPM_BUILD_ROOT | |
70 | ||
4fdf00cc | 71 | rm -rf $RPM_BUILD_ROOT%{_docdir}/couchdb |
8ed0acf8 | 72 | install -d $RPM_BUILD_ROOT/var/log/couchdb |
73 | ||
74 | install -d $RPM_BUILD_ROOT/etc/sysconfig | |
75 | mv $RPM_BUILD_ROOT/etc/default/couchdb $RPM_BUILD_ROOT/etc/sysconfig | |
76 | ||
77 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
78 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/couchdb | |
4fdf00cc | 79 | |
ec3f1cc9 ER |
80 | %clean |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %pre | |
84 | %groupadd -g 203 -r -f couchdb | |
85 | %useradd -u 203 -r -d /var/lib/couchdb -s /bin/sh -c "CouchDB Administrator" -g couchdb couchdb | |
86 | ||
4fdf00cc ER |
87 | %post |
88 | /sbin/chkconfig --add couchdb | |
89 | %service couchdb restart | |
90 | ||
91 | %preun | |
92 | if [ "$1" = "0" ]; then | |
93 | %service -q couchdb stop | |
94 | /sbin/chkconfig --del couchdb | |
95 | fi | |
96 | ||
ec3f1cc9 ER |
97 | %postun |
98 | if [ "$1" = "0" ]; then | |
99 | %userremove couchdb | |
100 | %groupremove couchdb | |
101 | fi | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc AUTHORS BUGS CHANGES NEWS NOTICE README THANKS | |
abe26a11 | 106 | %dir %{_sysconfdir}/couchdb |
6d6ce29d | 107 | %dir %{_sysconfdir}/couchdb/default.d |
8ed0acf8 | 108 | %attr(755,couchdb,couchdb) %{_sysconfdir}/couchdb/default.d |
109 | %attr(755,couchdb,couchdb) %dir %{_sysconfdir}/couchdb/local.d | |
110 | %attr(644,couchdb,couchdb) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/couchdb/default.ini | |
111 | %attr(644,couchdb,couchdb) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/couchdb/local.ini | |
4fdf00cc | 112 | # XXX -> sysconfdir |
8ed0acf8 | 113 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sysconfig/couchdb |
4fdf00cc ER |
114 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/couchdb |
115 | %attr(754,root,root) /etc/rc.d/init.d/couchdb | |
116 | ||
8ed0acf8 | 117 | %dir /var/log/couchdb |
118 | %attr(755,couchdb,couchdb) /var/log/couchdb | |
119 | ||
4fdf00cc ER |
120 | # XXX: sbindir? |
121 | %attr(755,root,root) %{_bindir}/couchdb | |
122 | %attr(755,root,root) %{_bindir}/couchjs | |
123 | %{_mandir}/man1/couchdb.1* | |
124 | %{_mandir}/man1/couchjs.1* | |
125 | ||
126 | %dir %{_libdir}/couchdb | |
127 | ||
128 | %dir %{_libdir}/couchdb/bin | |
129 | %attr(755,root,root) %{_libdir}/couchdb/bin/couchjs | |
130 | ||
131 | %dir %{_libdir}/couchdb/erlang | |
132 | %dir %{_libdir}/couchdb/erlang/lib | |
133 | # XXX: better have unversioned dirs? | |
6d6ce29d | 134 | %dir %{_libdir}/couchdb/erlang/lib/couch-%{version} |
135 | %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin | |
136 | %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin/*.beam | |
137 | %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin/*.app | |
4fdf00cc | 138 | # XXX check if this include is needed runtime |
abe26a11 | 139 | %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/include |
6d6ce29d | 140 | %{_libdir}/couchdb/erlang/lib/couch-%{version}/include/couch_db.hrl |
abe26a11 | 141 | |
4fdf00cc | 142 | # XXX: check if .la is needed |
abe26a11 | 143 | %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv |
6d6ce29d | 144 | %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/couchspawnkillable |
abe26a11 | 145 | |
146 | %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib | |
d8c1c0b3 | 147 | %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib/couch_icu_driver.la |
148 | %attr(755,root,root) %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib/couch_icu_driver.so | |
149 | /usr/lib64/couchdb/erlang/lib/couch-1.0.2/include/couch_js_functions.hrl | |
150 | /usr/lib64/couchdb/erlang/lib/couch-1.0.2/priv/stat_descriptions.cfg | |
6d6ce29d | 151 | |
4fdf00cc | 152 | # XXX: better have unversioned dirs? |
6d6ce29d | 153 | %dir %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver} |
154 | %dir %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin | |
155 | %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin/*.beam | |
156 | %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin/*.app | |
157 | ||
abe26a11 | 158 | %dir %{_libdir}/couchdb/erlang/lib/etap |
6d6ce29d | 159 | %{_libdir}/couchdb/erlang/lib/etap/ebin |
abe26a11 | 160 | |
161 | %dir %{_libdir}/couchdb/erlang/lib/erlang-oauth | |
6d6ce29d | 162 | %{_libdir}/couchdb/erlang/lib/erlang-oauth/ebin |
abe26a11 | 163 | |
164 | %dir %{_libdir}/couchdb/erlang/lib/ibrowse-%{_ibrowsever} | |
6d6ce29d | 165 | %{_libdir}/couchdb/erlang/lib/ibrowse-%{_ibrowsever}/ebin |
166 | ||
8ed0acf8 | 167 | %attr(755,couchdb,couchdb) %{_datadir}/couchdb |