Logoj0ke.net Open Build Service > Projects > devel:erlang > CouchDB-svn > Changes
Sign Up | Log In

Changes of Revision 16

[-] Changed couchdb.spec
x
 
1
@@ -6,6 +6,7 @@
2
 License:   GPL
3
 Source0:   %{name}-%{version}.tar.gz
4
 Source1:   couchdb.apache.conf
5
+Source2:   couchdb.suse.init
6
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7
 
8
 BuildRequires: libicu-devel curl-devel libxml2-devel
9
@@ -14,8 +15,15 @@
10
 Requires:       mozilla-xulrunner181 >= 1.8.1
11
 Requires:  erlang apache2 libicu-devel
12
 
13
-%description
14
+# Macro that print mesages to syslog at package (un)install time
15
+%define nnmmsg logger -t %{name}/rpm
16
+
17
 
18
+%description
19
+A CouchDB server hosts named databases, which store documents. 
20
+Each document is uniquely named in the database, and CouchDB 
21
+provides a [WWW] RESTful HTTP API for reading and 
22
+updating (add, edit, delete) database documents.
23
 
24
 %prep
25
 %setup
26
@@ -41,7 +49,10 @@
27
 rmdir %{buildroot}/%{_sysconfdir}/rc.d
28
 rmdir %{buildroot}/%{_sysconfdir}/default
29
 rm -Rf %{buildroot}%{_datadir}/doc/%{name} 
30
-sed -i s@default@sysconfig@g %{buildroot}/%{_sysconfdir}/init.d/%{name}
31
+# this was used with original init script
32
+#sed -i s@default@sysconfig@g %{buildroot}/%{_sysconfdir}/init.d/%{name}
33
+# replace original init script with Source2
34
+%{__install} -m 755 %{S:2} %{buildroot}/%{_sysconfdir}/init.d/%{name}
35
 # match entrys in config file
36
 mkdir -p %{buildroot}/var/log/%{name}
37
 mkdir -p %{buildroot}/var/lib/%{name}
38
@@ -53,8 +64,10 @@
39
 # Create `couchdb' user on the system if necessary
40
 if /usr/bin/id %{name} > /dev/null 2>&1 ; then
41
         : # user already exists
42
+   /usr/sbin/usermod -d -d %{_localstatedir}/lib/%{name} -g www -s /bin/bash %{name} || \
43
+       %nnmmsg Unexpected error changing user "%{name}". Aborting update process.
44
 else
45
-        /usr/sbin/useradd -r -d %{_datadir}/%{name} -g www -s /bin/bash -c "CouchDB" %{name} || \
46
+        /usr/sbin/useradd -r -d %{_localstatedir}/lib/%{name} -g www -s /bin/bash -c "CouchDB" %{name} || \
47
                 %nnmmsg Unexpected error adding user "%{name}". Aborting install process.
48
 fi
49
 
50
@@ -87,5 +100,10 @@
51
 %dir /var/lib/%{name}
52
 
53
 %changelog
54
+* Thu Mar 27 2008 Carsten Schoene <cs@linux-administrator.com>
55
+- fix postun 
56
+- replace init script
57
+- changed couchdb users homedir
58
+ 
59
 * Fri Mar 21 2008 Carsten Schoene <cs@linux-administrator.com>
60
 - initial svn build
61
[+] Added couchdb.suse.init ^