]> git.pld-linux.org Git - packages/bjorb.git/commitdiff
- initscript & related stuff added.
authortwittner <twittner@pld-linux.org>
Thu, 12 Aug 2004 02:21:31 +0000 (02:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bjorb.spec -> 1.3

bjorb.spec

index e9f7363036a890322d052170e26ac24ff6a571c1..5bb4cb7d8e4228ffdaf1cb469cb3ae9d934de668 100644 (file)
@@ -1,4 +1,3 @@
-# TODO: initscript
 Summary:       Bjorb - secure TCP relay software
 Name:          bjorb
 Version:       0.5.5p1
@@ -8,13 +7,13 @@ Group:                Networking/Daemons
 Source0:       http://people.FreeBSD.org/~foxfair/distfiles/%{name}-%{version}.tar.gz
 # Source0-md5: abea77967a1a0fd2dcd1b407d652b3bf
 # http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/bjorb/files/
+Source1:       %{name}.init
 Patch0:                %{name}-fbsd_patches.patch
 Patch1:                %{name}-Makefile.in.patch
 Patch2:                %{name}-sysconfdir.patch
 URL:           http://www.hitachi-ms.co.jp/bjorb/
 BuildRequires: libstdc++-devel
 BuildRequires: openssl-devel
-BuildRequires: openssl-tools
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -46,14 +45,33 @@ cd src
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/{bjorb.conf.sample,bjorb.conf}
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add %{name}
+if [ -f /var/lock/subsys/%{name} ]; then
+       /etc/rc.d/init.d/%{name} restart 1>&2
+else
+       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start Bjorb daemon."
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/%{name} ]; then
+               /etc/rc.d/init.d/%{name} stop 1>&2
+       fi
+       /sbin/chkconfig --del %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog COPYRIGHT README doc/sample/bjorb.conf.doc doc/sample/bjorb.conf.sample
 %lang(ja) %doc ChangeLog.jp COPYRIGHT.jp README.jp doc/features.jp doc/bjorb.conf.5.jp.txt
 %attr(755,root,root) %{_sbindir}/*
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
 %dir %{_sysconfdir}
 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
This page took 0.106152 seconds and 4 git commands to generate.