2 # TODO: init script, sysconfig
4 Summary: A distributed document-oriented database
5 Summary(pl.UTF-8): Rozproszona baza danych oparta o dokumenty
11 Source0: http://www.apache.net.pl/couchdb/1.0.1/apache-%{name}-%{version}.tar.gz
12 # Source0-md5: 001cf286b72492617e9ffba271702a00
13 #Source1: %{name}.init
14 URL: http://incubator.apache.org/couchdb/
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: curl-devel >= 7.18.0
19 BuildRequires: help2man
20 BuildRequires: intltool
21 BuildRequires: js-devel
22 BuildRequires: libicu-devel >= 3.4.1
23 BuildRequires: pakchois-devel
24 BuildRequires: rpmbuild(macros) >= 1.228
25 Requires(post,preun): /sbin/chkconfig
26 Requires(post,preun): /sbin/chkconfig
27 Requires(pre): /bin/id
28 Requires(pre): /usr/bin/getgid
29 Requires(pre): /usr/sbin/groupadd
30 Requires(pre): /usr/sbin/useradd
31 Provides: group(couchdb)
32 Provides: user(couchdb)
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Apache CouchDB is a distributed, fault-tolerant and schema-free
37 document-oriented database accessible via a RESTful HTTP/JSON
38 API. Among other features, it provides robust, incremental replication
39 with bi-directional conflict detection and resolution, and is
40 queryable and indexable using a table-oriented view engine with
41 JavaScript acting as the default view definition language.
43 %description -l pl.UTF-8
45 Apache CouchDB jest rozproszoną, odporną na błędy, nie wymagającą
46 schematów, zorientowaną na dokument bazą danych z RESTowym API opartym
47 o HTTP/JSON. Między innymi zapewnia solidną, przyrostową replikację
48 z dwukierunkowym wykrywaniem i rozwiązywaniem konfliktów, oraz odpytywanie
49 i indeksowanie za pośrednictwem opartego na tablicach silnika widoków
50 używającego JavaScriptu jako głównego języka definicji widoku.
53 %setup -q -n apache-%{name}-%{version}
56 %configure --with-erlang=%{_libdir}/erlang/usr/include
60 rm -rf $RPM_BUILD_ROOT
63 DESTDIR=$RPM_BUILD_ROOT
65 rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/*
67 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
69 mv $RPM_BUILD_ROOT/etc/rc.d/{,init.d}/%{name}
70 #install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
73 rm -rf $RPM_BUILD_ROOT
76 %groupadd -g 230 couchdb
77 %useradd -u 230 -g couchdb -c "CouchDB server" couchdb
80 /sbin/chkconfig --add %{name}
81 %service %{name} restart "CouchDB server"
84 if [ "$1" = "0" ]; then
86 /sbin/chkconfig --del %{name}
90 %defattr(644,root,root,755)
91 %doc AUTHORS BUGS CHANGES NEWS NOTICE README THANKS
92 %attr(755,root,root) %{_bindir}/*
95 %dir %{_sysconfdir}/couchdb
96 %dir %{_sysconfdir}/couchdb/default.d
97 %dir %{_sysconfdir}/couchdb/local.d
98 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/couchdb/*.ini
99 %attr(700,couchdb,couchdb) %dir %{_sharedstatedir}/couchdb
100 %attr(700,couchdb,couchdb) %dir %{_localstatedir}/log/couchdb
102 %attr(754,root,root) /etc/rc.d/init.d/%{name}
103 #config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}