aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile29
-rw-r--r--rpmdrake.spec4
2 files changed, 31 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1b89528b..bc80378f 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,9 @@
#
#*****************************************************************************
+VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec)
+NAME = rpmdrake
+
DIRS = grpmi po data
PREFIX = /usr/local
@@ -20,6 +23,7 @@ DATADIR = $(PREFIX)/share
BINDIR = $(PREFIX)/bin
SBINDIR = $(PREFIX)/sbin
RELATIVE_SBIN = ../sbin
+RPM=$(HOME)/rpm
all: dirs
@@ -74,3 +78,28 @@ hack:
cp -f $(SOFTHOME)/rpmdrake/rpmdrake.pm $(shell rpm --eval %perl_vendorlib)
cp -f $(GIHOME)/perl-install/ugtk2.pm /usr/lib/libDrakX
perl -pi -e 's|use strict.*||;s|use vars.*||;s|use diagnostics.*||' /usr/lib/libDrakX/*.pm /usr/sbin/{rpmdrake,edit-urpm-sources.pl}
+
+
+
+
+dis: clean
+ rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ mkdir -p $(NAME)-$(VERSION)
+ find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
+ find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore |xargs rm -rf
+ tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
+ bzip2 -9f ../$(NAME)-$(VERSION).tar
+ rm -rf $(NAME)-$(VERSION)
+
+srpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM)
+ cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES
+ cp -f $(NAME).spec $(RPM)/SPECS/
+ rm -f ../$(NAME)-$(VERSION).tar.bz2
+ rpm -bs $(NAME).spec
+
+rpm: srpm
+ rpm -bb --clean --rmsource $(NAME).spec
+
+ChangeLog:
+ cvs2cl -W 400 -I Changelog --accum -U ../../soft/common/username
+ rm -f *.bak \ No newline at end of file
diff --git a/rpmdrake.spec b/rpmdrake.spec
index d47d8a07..2de8b642 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -14,7 +14,7 @@ Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
-Source0: rpmdrake.tar.bz2
+Source0: %name-%version.tar.bz2
Summary: Mandrake Linux graphical front end for choosing packages for installion/removal
Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi >= 4.3-15mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools >= 9.2-0.6mdk rpmtools >= 4.5
Requires: perl-Gtk2 >= 0.90-2mdk perl-Locale-gettext >= 1.01-7mdk
@@ -37,7 +37,7 @@ A fourth program manages the media (add, remove, edit).
%prep
rm -rf $RPM_BUILD_ROOT
-%setup -q -n rpmdrake
+%setup -q
%build
make OPTIMIZE="$RPM_OPT_FLAGS -Wall" PREFIX=%{_prefix} INSTALLDIRS=vendor