/[packages]/updates/3/couchdb/current/SPECS/couchdb.spec
ViewVC logotype

Contents of /updates/3/couchdb/current/SPECS/couchdb.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389213 - (show annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (11 years, 3 months ago) by pterjan
Original Path: obsolete/cauldron/couchdb/current/SPECS/couchdb.spec
File size: 4320 byte(s)
Drop 
1 %define tarname apache-couchdb
2 %define couchdb_user couchdb
3 %define couchdb_group couchdb
4 %define couchdb_home %{_localstatedir}/lib/couchdb
5
6 Name: couchdb
7 Version: 1.2.0
8 Release: %mkrel 7
9 Summary: A document database server, accessible via a RESTful JSON API
10 Group: Databases
11 License: Apache License
12 URL: http://couchdb.apache.org/
13 Source0: http://www.apache.org/dist/%{name}/releases/%{version}/%{tarname}-%{version}.tar.gz
14 Source1: %{name}.service
15 Source2: %{name}.tmpfiles.conf
16
17 BuildRequires: erlang-devel erlang-compiler erlang-crypto erlang-eunit
18 BuildRequires: libicu-devel
19 BuildRequires: js-devel
20 BuildRequires: help2man
21 BuildRequires: curl-devel
22
23 Requires: couchdb-bin
24
25 Requires(pre): shadow-utils
26
27 %description
28 Apache CouchDB is a distributed, fault-tolerant and schema-free
29 document-oriented database accessible via a RESTful HTTP/JSON API.
30 Among other features, it provides robust, incremental replication
31 with bi-directional conflict detection and resolution, and is
32 queryable and indexable using a table-oriented view engine with
33 JavaScript acting as the default view definition language.
34
35 This package contains the systemd unit needed to start a systemwide
36 instance of CouchDB.
37
38 %package bin
39 Group: Databases
40 Summary: Binary for Couchdb, a document database server
41
42 Requires: erlang
43 Requires: erlang-crypto
44 Requires: erlang-ssl
45 Requires: erlang-xmerl
46 Requires: erlang-inets
47 Requires: erlang-tools
48 Requires: erlang-public_key
49 Requires: erlang-os_mon
50
51 %description bin
52 Apache CouchDB is a distributed, fault-tolerant and schema-free
53 document-oriented database accessible via a RESTful HTTP/JSON API.
54 Among other features, it provides robust, incremental replication
55 with bi-directional conflict detection and resolution, and is
56 queryable and indexable using a table-oriented view engine with
57 JavaScript acting as the default view definition language.
58
59 This package contains the binary needed to run a CouchDB instance.
60
61
62 %prep
63 %setup -q -n %{tarname}-%{version}
64
65 # fix build with new automake 1.13
66 sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' configure.*
67
68 %build
69 autoreconf -fi
70 %configure2_5x \
71 --with-js-include=%{_includedir}/js \
72 --with-erlang=%{_libdir}/erlang%{_includedir}
73
74 %make
75
76
77 %install
78 %makeinstall_std
79
80 # Libdir for systemd unit
81 sed -i -e 's|@LIBDIR@|%{_libdir}|' %{SOURCE1}
82
83 # Install systemd unit
84 install -D -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
85
86 # Install tmpfiles entry
87 install -D -m 644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
88
89 # Create /var/log/couchdb
90 mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
91
92 # Create /var/lib/couchdb
93 mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
94
95 # Create /etc/couchdb/default.d
96 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/default.d
97
98 # Create /etc/couchdb/local.d
99 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/local.d
100
101 ## Use /etc/sysconfig instead of /etc/default
102 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
103 mv %{buildroot}%{_sysconfdir}/default/couchdb \
104 %{buildroot}%{_sysconfdir}/sysconfig/%{name}
105 rm -rf %{buildroot}%{_sysconfdir}/default
106
107 # Remove unecessary files
108 rm %{buildroot}%{_sysconfdir}/rc.d/couchdb
109 rm -rf %{buildroot}%{_datadir}/doc/couchdb
110
111 # clean-up .la archives
112 find %{buildroot} -name '*.la' -delete
113
114
115 %pre bin
116 %_pre_useradd %{couchdb_user} %{couchdb_home} /bin/bash
117
118
119 %post
120 %_post_service %{name}
121
122 %post bin
123 # (cg) NB This should really be before the _post_service above... but packaging
124 # here seems really bizare with it's split...
125 %_tmpfilescreate %{name}
126
127 %postun bin
128 %_postun_userdel %{couchdb_user}
129
130
131 %preun
132 %_preun_service %{name}
133
134
135 %files
136 %doc AUTHORS BUGS CHANGES LICENSE NEWS NOTICE README THANKS
137 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
138 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
139 %{_unitdir}/%{name}.service
140
141 %files bin
142 %{_bindir}/*
143 %dir %{_sysconfdir}/%{name}
144 %dir %{_sysconfdir}/%{name}/local.d
145 %dir %{_sysconfdir}/%{name}/default.d
146 %config(noreplace) %attr(0644,%{couchdb_user},root) %{_sysconfdir}/%{name}/default.ini
147 %config(noreplace) %attr(0644,%{couchdb_user},root) %{_sysconfdir}/%{name}/local.ini
148 %{_tmpfilesdir}/%{name}.conf
149 %{_libdir}/%{name}
150 %{_datadir}/%{name}
151 %{_mandir}/man1/*
152 %dir %attr(0755,%{couchdb_user},root) %{_localstatedir}/log/%{name}
153 %dir %attr(0755,%{couchdb_user},root) %{_localstatedir}/lib/%{name}

  ViewVC Help
Powered by ViewVC 1.1.30