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