]> git.pld-linux.org Git - packages/apache-couchdb.git/blob - apache-couchdb.spec
- provide missing dirs
[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.2
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
98 %dir %{_sysconfdir}/couchdb/default.d
99 %dir %{_sysconfdir}/couchdb/local.d
100 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/couchdb/default.ini
101 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/couchdb/local.ini
102 # XXX -> sysconfdir
103 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/couchdb
104 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/couchdb
105 %attr(754,root,root) /etc/rc.d/init.d/couchdb
106
107 # XXX: sbindir?
108 %attr(755,root,root) %{_bindir}/couchdb
109 %attr(755,root,root) %{_bindir}/couchjs
110 %{_mandir}/man1/couchdb.1*
111 %{_mandir}/man1/couchjs.1*
112
113 %dir %{_libdir}/couchdb
114
115 %dir %{_libdir}/couchdb/bin
116 %attr(755,root,root) %{_libdir}/couchdb/bin/couchjs
117
118 %dir %{_libdir}/couchdb/erlang
119 %dir %{_libdir}/couchdb/erlang/lib
120 # XXX: better have unversioned dirs?
121 %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}
122 %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin
123 %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin/*.beam
124 %{_libdir}/couchdb/erlang/lib/couch-%{version}/ebin/*.app
125 # XXX check if this include is needed runtime
126 %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/include
127 %{_libdir}/couchdb/erlang/lib/couch-%{version}/include/couch_db.hrl
128
129 # XXX: check if .la is needed
130 %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv
131 %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/couchspawnkillable
132
133 %dir %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib
134 %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib/couch_erl_driver.la
135 %attr(755,root,root) %{_libdir}/couchdb/erlang/lib/couch-%{version}/priv/lib/couch_erl_driver.so
136
137 # XXX: better have unversioned dirs?
138 %dir %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}
139 %dir %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin
140 %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin/*.beam
141 %{_libdir}/couchdb/erlang/lib/mochiweb-%{_mochiwebver}/ebin/*.app
142
143 %dir %{_libdir}/couchdb/erlang/lib/etap
144 %{_libdir}/couchdb/erlang/lib/etap/ebin
145
146 %dir %{_libdir}/couchdb/erlang/lib/erlang-oauth
147 %{_libdir}/couchdb/erlang/lib/erlang-oauth/ebin
148
149 %dir %{_libdir}/couchdb/erlang/lib/ibrowse-%{_ibrowsever}
150 %{_libdir}/couchdb/erlang/lib/ibrowse-%{_ibrowsever}/ebin
151
152 %{_datadir}/couchdb
This page took 0.068014 seconds and 4 git commands to generate.