null+****@clear*****
null+****@clear*****
2012年 2月 1日 (水) 17:36:52 JST
Kouhei Sutou 2012-02-01 17:36:52 +0900 (Wed, 01 Feb 2012) New Revision: d61f0d52bbdb3a3f7e0a96c3f8436a240166f2ac Log: [fedora] add --with-package-platform=fedora. Based patch by Daiki Ueno. Thanks!!! Added files: data/systemd/Makefile.am data/systemd/fedora/Makefile.am data/systemd/fedora/groonga.service data/systemd/fedora/sysconfig/Makefile.am data/systemd/fedora/sysconfig/groonga Modified files: configure.ac data/Makefile.am Modified: configure.ac (+6 -1) =================================================================== --- configure.ac 2012-02-01 17:24:09 +0900 (36f26da) +++ configure.ac 2012-02-01 17:36:52 +0900 (78f4a9a) @@ -214,6 +214,9 @@ AC_CONFIG_FILES([ data/init.d/Makefile data/init.d/redhat/Makefile data/init.d/redhat/sysconfig/Makefile + data/systemd/Makefile + data/systemd/fedora/Makefile + data/systemd/fedora/sysconfig/Makefile tools/Makefile doc/Makefile doc/locale/Makefile @@ -976,13 +979,15 @@ AC_MSG_CHECKING([whether package platform]) AC_ARG_WITH(package-platform, [AS_HELP_STRING([--with-package-platform=PLATFORM], [install package platform related files. [default=no] - (supported package platforms: redhat)])], + (supported package platforms: redhat, fedora)])], [package_platform="$withval"], [package_platform="no"]) AC_MSG_RESULT($package_platform) AM_CONDITIONAL([REDHAT_PLATFORM], [test "${package_platform}" = "redhat"]) +AM_CONDITIONAL([FEDORA_PLATFORM], + [test "${package_platform}" = "fedora"]) # plugins check relative_pluginsdir="\$(PACKAGE)/plugins" Modified: data/Makefile.am (+2 -1) =================================================================== --- data/Makefile.am 2012-02-01 17:24:09 +0900 (be6899e) +++ data/Makefile.am 2012-02-01 17:36:52 +0900 (3620339) @@ -1,7 +1,8 @@ SUBDIRS = \ html \ munin \ - init.d + init.d \ + systemd pkgsysconfdir = $(sysconfdir)/$(PACKAGE) dist_pkgsysconf_DATA = \ Added: data/systemd/Makefile.am (+1 -0) 100644 =================================================================== --- /dev/null +++ data/systemd/Makefile.am 2012-02-01 17:36:52 +0900 (5e83c67) @@ -0,0 +1 @@ +SUBDIRS = fedora Added: data/systemd/fedora/Makefile.am (+10 -0) 100644 =================================================================== --- /dev/null +++ data/systemd/fedora/Makefile.am 2012-02-01 17:36:52 +0900 (d7b8487) @@ -0,0 +1,10 @@ +SUBDIRS = sysconfig + +services = groonga.service + +if FEDORA_PLATFORM +unitdir = /lib/systemd/system +dist_unit_DATA = $(services) +else +EXTRA_DIST = $(services) +endif Added: data/systemd/fedora/groonga.service (+11 -0) 100644 =================================================================== --- /dev/null +++ data/systemd/fedora/groonga.service 2012-02-01 17:36:52 +0900 (5d77279) @@ -0,0 +1,11 @@ +[Unit] +Description=Groonga Text Searching Engine +After=network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/sysconfig/groonga +ExecStart=/usr/bin/groonga -d --pid-path /run/groonga/groonga.pid --address $ADDRESS --log-path $LOG_PATH --query-log-path $QUERY_LOG_PATH --protocol $PROTOCOL $DATABASE + +[Install] +WantedBy=multi-user.target Added: data/systemd/fedora/sysconfig/Makefile.am (+8 -0) 100644 =================================================================== --- /dev/null +++ data/systemd/fedora/sysconfig/Makefile.am 2012-02-01 17:36:52 +0900 (b1d9ba3) @@ -0,0 +1,8 @@ +data = groonga + +if FEDORA_PLATFORM +sysconfigdir = $(sysconfdir)/sysconfig +dist_sysconfig_DATA = $(data) +else +EXTRA_DIST = $(data) +endif Added: data/systemd/fedora/sysconfig/groonga (+8 -0) 100644 =================================================================== --- /dev/null +++ data/systemd/fedora/sysconfig/groonga 2012-02-01 17:36:52 +0900 (5cef8a9) @@ -0,0 +1,8 @@ +# Default +USER=groonga +GROUP=groonga +ADDRESS=127.0.0.1 +DATABASE=/var/lib/groonga/db/db +LOG_PATH=/var/log/groonga/groonga.log +QUERY_LOG_PATH=/var/log/groonga/query.log +PROTOCOL=http