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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 336582 - (hide annotations) (download)
Mon Dec 31 13:12:18 2012 UTC (11 years, 3 months ago) by wally
Original Path: cauldron/couchdb/current/SPECS/couchdb.spec
File size: 4320 byte(s)
- fix build with new automake 1.13
1 dmorgan 77595 %define tarname apache-couchdb
2     %define couchdb_user couchdb
3     %define couchdb_group couchdb
4     %define couchdb_home %{_localstatedir}/lib/couchdb
5    
6 sander85 277298 Name: couchdb
7     Version: 1.2.0
8 wally 336582 Release: %mkrel 6
9 sander85 277298 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 dmorgan 77595
17 sander85 277298 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 dmorgan 77595
23 sander85 277298 Requires: couchdb-bin
24 dmorgan 77595
25 sander85 277298 Requires(pre): shadow-utils
26 dmorgan 77595
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 sander85 277298 This package contains the systemd unit needed to start a systemwide
36     instance of CouchDB.
37 dmorgan 77595
38 sander85 277298 %package bin
39     Group: Databases
40     Summary: Binary for Couchdb, a document database server
41 dmorgan 77595
42 sander85 277298 Requires: erlang
43 dmorgan 77595 Requires: erlang-crypto
44     Requires: erlang-ssl
45     Requires: erlang-xmerl
46     Requires: erlang-inets
47     Requires: erlang-tools
48 sander85 277298 Requires: erlang-public_key
49     Requires: erlang-os_mon
50 dmorgan 77595
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 sander85 277298
62 dmorgan 77595 %prep
63     %setup -q -n %{tarname}-%{version}
64    
65 wally 336582 # fix build with new automake 1.13
66     sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' configure.*
67 sander85 277298
68 dmorgan 77595 %build
69 sander85 277298 autoreconf -fi
70 sander85 276749 %configure2_5x \
71 wally 187826 --with-js-include=%{_includedir}/js \
72     --with-erlang=%{_libdir}/erlang%{_includedir}
73 dmorgan 77595
74 sander85 276749 %make
75 dmorgan 77595
76 sander85 277298
77 dmorgan 77595 %install
78 fwang 187690 %makeinstall_std
79 dmorgan 77595
80 sander85 277298 # Libdir for systemd unit
81     sed -i -e 's|@LIBDIR@|%{_libdir}|' %{SOURCE1}
82 dmorgan 77595
83 sander85 277298 # Install systemd unit
84     install -D -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
85    
86 colin 321769 # Install tmpfiles entry
87     install -D -m 644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
88 sander85 277298
89 dmorgan 77595 # Create /var/log/couchdb
90 fwang 187690 mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
91 dmorgan 77595
92     # Create /var/lib/couchdb
93 fwang 187690 mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
94 dmorgan 77595
95     # Create /etc/couchdb/default.d
96 fwang 187690 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/default.d
97 dmorgan 77595
98     # Create /etc/couchdb/local.d
99 fwang 187690 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/local.d
100 dmorgan 77595
101     ## Use /etc/sysconfig instead of /etc/default
102 fwang 187690 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
103     mv %{buildroot}%{_sysconfdir}/default/couchdb \
104     %{buildroot}%{_sysconfdir}/sysconfig/%{name}
105     rm -rf %{buildroot}%{_sysconfdir}/default
106 dmorgan 77595
107     # Remove unecessary files
108 fwang 187690 rm %{buildroot}%{_sysconfdir}/rc.d/couchdb
109     rm -rf %{buildroot}%{_datadir}/doc/couchdb
110 dmorgan 77595
111     # clean-up .la archives
112 colin 321769 find %{buildroot} -name '*.la' -delete
113 dmorgan 77595
114 sander85 277298
115 dmorgan 77595 %pre bin
116     %_pre_useradd %{couchdb_user} %{couchdb_home} /bin/bash
117    
118 sander85 277298
119 dmorgan 77595 %post
120     %_post_service %{name}
121    
122 colin 321769 %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 sander85 277298
127 dmorgan 77595 %postun bin
128     %_postun_userdel %{couchdb_user}
129    
130 sander85 277298
131 dmorgan 77595 %preun
132     %_preun_service %{name}
133    
134 sander85 277298
135 dmorgan 77595 %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 sander85 277298 %{_unitdir}/%{name}.service
140 dmorgan 77595
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 colin 321769 %{_tmpfilesdir}/%{name}.conf
149 dmorgan 77595 %{_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