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