Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a7e4f473f | ||
|
|
ac00b50ba6 | ||
|
|
ff67481dc3 | ||
| 9b5b4cd51d |
7 changed files with 167 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
vmpsd-1.4.01.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: vmpsd
|
||||
# $Id$
|
||||
NAME := vmpsd
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
b95f6390f0a340f4f99d4e8f72201cb4 vmpsd-1.4.01.tar.gz
|
||||
62
vmpsd.init
Normal file
62
vmpsd.init
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# chkconfig: - 92 8
|
||||
# description: vmpsd is a GPL implementation of Cisco's VMPS
|
||||
# processname: vmpsd
|
||||
# pidfile: /var/run/vmpsd.pid
|
||||
# config: /etc/sysconfig/vmpsd
|
||||
|
||||
# source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
if test -e /etc/sysconfig/vmpsd ; then
|
||||
. /etc/sysconfig/vmpsd
|
||||
fi
|
||||
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
echo -n $"Starting vmpsd: "
|
||||
|
||||
daemon --user nobody vmpsd $OPTIONS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/vmpsd
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Shutting down vmpsd: "
|
||||
killproc vmpsd
|
||||
RETVAL=$?
|
||||
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/vmpsd
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f /var/lock/subsys/vmpsd ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status vmpsd
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
102
vmpsd.spec
Normal file
102
vmpsd.spec
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
Name: vmpsd
|
||||
Version: 1.4.01
|
||||
Release: 6%{?dist}
|
||||
Summary: A GPL implementation of Cisco Systems' VMPS
|
||||
|
||||
Group: System Environment/Daemons
|
||||
# Valid license according to http://fedoraproject.org/wiki/Licensing
|
||||
License: GPL+
|
||||
URL: http://vmps.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/vmps/%{name}-%{version}.tar.gz
|
||||
Source1: vmpsd.sysconfig
|
||||
Source2: vmpsd.init
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
# This is for /sbin/service
|
||||
Requires(preun): initscripts
|
||||
Requires(postun): initscripts
|
||||
|
||||
%description
|
||||
VMPS (VLAN Management Policy Server) is a way of assigning switch ports to
|
||||
specific VLANs based on MAC address of connecting device. OpenVMPS is a GPL
|
||||
implementation of VMPS.
|
||||
|
||||
%prep
|
||||
%setup -qn %{name}
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}
|
||||
|
||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
||||
|
||||
install %{S:1} -p -m 0644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
|
||||
install %{S:2} -p $RPM_BUILD_ROOT%{_initrddir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/sbin/service %{name} stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del %{name}
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/vlan.db
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||
%attr(0755,root,root) %{_initrddir}/%{name}
|
||||
%attr(0755,root,root) %{_bindir}/%{name}
|
||||
%doc doc/NetregExtension.txt
|
||||
%doc doc/VQP-spec.txt
|
||||
%doc doc/vlan.db.example
|
||||
%doc COPYING.GPL ChangeLog AUTHORS
|
||||
%{_mandir}/man1/%{name}.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Sep 7 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-6%{?dist}
|
||||
- Remove condrestart from post section as it's now in the postun section
|
||||
- Stop packaging the INSTALL file
|
||||
|
||||
* Sun Sep 6 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-5
|
||||
- Add condrestart in postun
|
||||
- Add ChangeLog and COPYING.GPL to files section
|
||||
|
||||
* Sat Sep 5 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-4
|
||||
- Add condrestart into post section
|
||||
- Use macros in files section
|
||||
- Remove '$DESTDIR=$RPM_BUILD_ROOT' from make in build section
|
||||
- Do parallel make
|
||||
- Don't start service by default
|
||||
- Add Requires for post and preun
|
||||
- Correct the Source0 URL
|
||||
- Move clean to after install
|
||||
|
||||
* Tue Sep 1 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-3
|
||||
- Split /etc/sysconfig/vmpsd and /etc/rc.d/init.d/vmpsd out of the spec file
|
||||
- Corrected license from GPLv2 to GPL+
|
||||
- Ensured that the make is done in the build section
|
||||
|
||||
* Thu Aug 20 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-2
|
||||
- Tidied spec file and silenced rpmlint output
|
||||
|
||||
* Mon Aug 17 2009 Colin Coe <colin.coe@gmail.com> - 1.4.01-1
|
||||
- Initial Packaging
|
||||
1
vmpsd.sysconfig
Normal file
1
vmpsd.sysconfig
Normal file
|
|
@ -0,0 +1 @@
|
|||
OPTIONS="-f /etc/vmps.db -l 0x700"
|
||||
Loading…
Add table
Add a link
Reference in a new issue