aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile20
-rw-r--r--numlock.spec73
2 files changed, 92 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4e67373..a919495 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+NAME= numlock
+VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec)
+
TOP=
CFLAGS=-g -O2 -Wall
CC=gcc
@@ -17,4 +20,19 @@ install: all
install -m755 enable_X11_numlock $(TOP)/usr/X11R6/bin
install -m755 numlock $(TOP)/etc/rc.d/init.d/
- install -m755 numlock.sh $(TOP)/etc/profile.d/ \ No newline at end of file
+ install -m755 numlock.sh $(TOP)/etc/profile.d/
+dis:
+ rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ cvs commit
+ mkdir -p $(NAME)-$(VERSION)
+ find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
+ find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore -o -name unused |xargs rm -rf
+ tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
+ bzip2 -9f ../$(NAME)-$(VERSION).tar
+ rm -rf $(NAME)-$(VERSION)
+
+rpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM)
+ cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES
+ cp -f $(NAME).spec $(RPM)/SPECS/
+ -rpm -ba --clean --rmsource $(NAME).spec
+ rm -f ../$(NAME)-$(VERSION).tar.bz2
diff --git a/numlock.spec b/numlock.spec
new file mode 100644
index 0000000..cc3daab
--- /dev/null
+++ b/numlock.spec
@@ -0,0 +1,73 @@
+%define name numlock
+%define version 1.0
+%define release 6mdk
+
+
+Summary: Numlock key locker.
+Name: %{name}
+Version: 1.0
+Release: %{release}
+Copyright: GPL
+Group: System/Configuration/Boot and Init
+# get the source from our cvs repository (see
+# http://www.linuxmandrake.com/en/cvs.php3)
+Source0: %{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-buildroot
+BuildArchitectures: noarch
+Prefix: /
+Requires: fileutils console-tools
+Obsoletes: NumLock
+
+%description
+
+NumLock enable to lock the numlock key. Only enable it at boot-time with
+ntsysv or with any other SVSR like rc.d config scripts editor such as
+tksysv or the ones from GNOME and KDE.
+NumLock is safe for portable as it is disabled by default.
+
+%prep
+%setup
+
+%build
+make CFLAGS=$RPM_OPT_FLAGS
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install TOP=$RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add numlock
+
+%preun
+if [ $1 = 0 ];then
+ /sbin/chkconfig --del numlock
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(755,root,root)
+/etc/rc.d/init.d/%{name}
+/etc/profile.d/%{name}.sh
+/usr/X11R6/bin/*
+
+%changelog
+* Fri Mar 31 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 1.0-5mdk
+- new groups
+
+* Wed Dec 22 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
+- fix a bug in xterm handling (reject /dev/ttya??)
+
+* Thu Nov 18 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
+- fix chkconfig
+- explicitely requires console-tools for touch (this would be the first
+ rpm to do this !) and fileutils for setleds (which may have cause problems)
+
+* Fri Oct 28 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
+- fix a typo (rpm include the %setup in the %description section !!!)
+- lowercase the rpm name for Lord DarkChmou
+
+* Fri Oct 24 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
+- initial spec
+