aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 19 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