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