Navigation Menu

Skip to content

Commit

Permalink
rpm: add groonga-server-common package
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Aug 2, 2012
1 parent c56e618 commit 4d65fac
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
14 changes: 13 additions & 1 deletion packages/rpm/centos/groonga.spec.in
Expand Up @@ -45,6 +45,16 @@ Requires(postun): /sbin/ldconfig
%description libs
This package contains the libraries for groonga

%package server-common
Summary: Common packages for the groonga server and the groonga HTTP server
Group: Applications/Text
License: LGPLv2
Requires: %{name} = %{version}-%{release}
Requires(pre): shadow-utils

%description server-common
This package provides common settings for server use

%package server
Summary: Groonga server
Group: Applications/Text
Expand Down Expand Up @@ -166,7 +176,7 @@ EOC
%clean
rm -rf $RPM_BUILD_ROOT

%pre server
%pre server-common
getent group groonga >/dev/null || groupadd -r groonga
getent passwd groonga >/dev/null || \
useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
Expand Down Expand Up @@ -222,6 +232,8 @@ fi
%{_libdir}/groonga/plugins/table/table.so
%{_datadir}/groonga/

%files server-common

%files server
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/groonga/
Expand Down
21 changes: 13 additions & 8 deletions packages/rpm/fedora/groonga.spec.in
Expand Up @@ -44,6 +44,16 @@ Requires(postun): /sbin/ldconfig
%description libs
This package contains the libraries for groonga

%package server-common
Summary: Common packages for the groonga server and the groonga HTTP server
Group: Applications/Text
License: LGPLv2
Requires: %{name} = %{version}-%{release}
Requires(pre): shadow-utils

%description server-common
This package provides common settings for server use

%package server
Summary: Groonga server
Group: Applications/Text
Expand Down Expand Up @@ -206,7 +216,7 @@ cd %{_builddir}/%{name}-%{version}/bindings/php
make install INSTALL_ROOT=$RPM_BUILD_ROOT INSTALL="install -p"


%pre server
%pre server-common
getent group groonga >/dev/null || groupadd -r groonga
getent passwd groonga >/dev/null || \
useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
Expand All @@ -218,13 +228,6 @@ if [ $1 = 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

%pre httpd
getent group groonga >/dev/null || groupadd -r groonga
getent passwd groonga >/dev/null || \
useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
-c 'groonga' groonga
exit 0

%post httpd
if [ $1 = 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
Expand Down Expand Up @@ -295,6 +298,8 @@ fi
%{_libdir}/groonga/plugins/table/table.so
%{_datadir}/groonga/

%files server-common

%files server
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/groonga/
Expand Down

0 comments on commit 4d65fac

Please sign in to comment.