- update .spec file; - cosmetic in init.d scripts

This commit is contained in:
root 2010-02-01 12:22:12 +03:00
parent 11df912162
commit 9a1c5ee548
2 changed files with 19 additions and 13 deletions

View File

@ -38,7 +38,7 @@ RETVAL=0
start() { start() {
KIND="UHUB" KIND="Uhub"
echo -n $"Starting $KIND services: " echo -n $"Starting $KIND services: "
daemon uhub $UHUBOPTIONS daemon uhub $UHUBOPTIONS
RETVAL=$? RETVAL=$?
@ -47,7 +47,7 @@ start() {
} }
stop() { stop() {
KIND="UHUB" KIND="Uhub"
echo -n $"Shutting down $KIND services: " echo -n $"Shutting down $KIND services: "
killproc uhub killproc uhub
RETVAL=$? RETVAL=$?

View File

@ -1,9 +1,9 @@
Summary: High performance ADC p2p hub. Summary: High performance ADC p2p hub.
Name: uhub Name: uhub
Version: 0.3.0 Version: 0.3.0
Release: 1 Release: 3
License: GPL License: GPLv3
Group: Applications/Internet Group: Networking/File transfer
Source: uhub-%{version}.tar.gz Source: uhub-%{version}.tar.gz
URL: http://www.uhub.org URL: http://www.uhub.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -27,7 +27,6 @@ Key features:
%build %build
echo RPM_BUILD_ROOT = $RPM_BUILD_ROOT echo RPM_BUILD_ROOT = $RPM_BUILD_ROOT
make clean
make make
%install %install
@ -40,12 +39,12 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
install uhub $RPM_BUILD_ROOT/usr/bin/ install uhub $RPM_BUILD_ROOT/usr/bin/
> doc/motd.txt > doc/motd.txt
install doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt $RPM_BUILD_ROOT/etc/uhub install -m644 doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt $RPM_BUILD_ROOT/etc/uhub
install doc/init.d.RedHat/etc/init.d/uhub $RPM_BUILD_ROOT/etc/init.d install doc/init.d.RedHat/etc/init.d/uhub $RPM_BUILD_ROOT/etc/init.d
install doc/init.d.RedHat/etc/sysconfig/uhub $RPM_BUILD_ROOT/etc/sysconfig/ install -m644 doc/init.d.RedHat/etc/sysconfig/uhub $RPM_BUILD_ROOT/etc/sysconfig/
install doc/init.d.RedHat/etc/logrotate.d/uhub $RPM_BUILD_ROOT/etc/logrotate.d/ install -m644 doc/init.d.RedHat/etc/logrotate.d/uhub $RPM_BUILD_ROOT/etc/logrotate.d/
/bin/gzip -9c doc/uhub.1 > doc/uhub.1.gz && /bin/gzip -9c doc/uhub.1 > doc/uhub.1.gz &&
install doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1 install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1
%files %files
@ -64,15 +63,22 @@ install doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1
%clean %clean
make clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post %post
/sbin/chkconfig --add uhub
if [ $1 -gt 1 ] ; then
/etc/rc.d/init.d/uhub restart >/dev/null || :
fi
# need more informations about add services and users in system # need more informations about add services and users in system
#chkconfig uhub on /usr/sbin/adduser -M -d /tmp -G nobody -s /sbin/nologin -c 'The Uhub ADC p2p hub Daemon' uhub >/dev/null 2>&1 ||:
#adduser -M -d /tmp -G nobody -s /sbin/nologin uhub
%changelog %changelog
* Tue Jan 31 2010 E_zombie
- change GROUP
- chmod for files
- add postinstall scripts
- fix "License"
* Tue Jan 26 2010 E_zombie * Tue Jan 26 2010 E_zombie
- first .spec release - first .spec release