diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2003-01-29 16:42:19 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2003-01-29 16:42:19 +0000 |
commit | aa777ca572b787515d397fc76b13d380153280e5 (patch) | |
tree | 24835c4ab1b3404eac9a16963532dcde5f644452 | |
parent | 40c11c745095aa01e99fd683edb1e29ec6f13e93 (diff) | |
download | quilt-aa777ca572b787515d397fc76b13d380153280e5.tar.gz |
Add RELEASE to Makefile; generate spec file from template + Makefile
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | quilt.spec.in (renamed from quilt.spec) | 15 |
2 files changed, 25 insertions, 14 deletions
@@ -1,5 +1,6 @@ PACKAGE := quilt VERSION := 0.21 +RELEASE := 1 prefix := /usr/local bindir := $(prefix)/bin @@ -14,7 +15,8 @@ CFLAGS = -g -Wall #----------------------------------------------------------------------- SRC += COPYING AUTHORS TODO BUGS Makefile \ - quilt.spec quilt.changes + quilt.spec.in quilt.spec quilt.changes +DIRT += quilt.spec BIN_IN := quilt BIN_SRC := $(BIN_IN:%=%.in) guards @@ -70,7 +72,7 @@ bin/guards.1 : bin/guards mkdir -p $$(dirname $@) pod2man $< > $@ -dist : +dist : spec rm -f $(PACKAGE)-$(VERSION) ln -s . $(PACKAGE)-$(VERSION) tar cvfz $(PACKAGE)-$(VERSION).tar.gz \ @@ -96,6 +98,24 @@ install : all install -d $(BUILD_ROOT)$(mandir)/man1 install -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/ +spec : $(PACKAGE).spec +$(PACKAGE).spec : $(PACKAGE).spec.in $(PACKAGE).changes + @echo "Generating spec file" + @sed -e 's/^\(Version:[ \t]*\).*/\1$(VERSION)/' \ + -e 's/^\(Release:[ \t]\).*/\1$(RELEASE)/' \ + < $< > $@ + @perl -ne ' \ + m/^(|-+)$$/ and next; \ + ( \ + s/^(...) \s (...) \s (.\d) \s (\d\d:\d\d:\d\d) \s \ + (...) \s (\d\d\d\d) \s - \s (.+) \ + /* $$1 $$2 $$3 $$6 - $$7/x || \ + m/^(- | )(?!\s)/ \ + and print \ + ) or die "Syntax error in line $$. of changelog:\n$$_\n"; \ + ' $(PACKAGE).changes \ + | lib/parse-patch -u changelog $@ + clean distclean : rm -f $(DIRT) diff --git a/quilt.spec b/quilt.spec.in index d260730..360f724 100644 --- a/quilt.spec +++ b/quilt.spec.in @@ -1,22 +1,13 @@ # # spec file for quilt - patch management scripts # -# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. -# -# Please submit bugfixes or comments via http://www.suse.de/feedback/ -# - -# neededforbuild sh-utils -# usedforbuild Name: quilt Summary: Scripts for working with series of patches License: GPL Group: Productivity/Text/Utilities -Version: 0.21 -Release: 1 +Version: 0 +Release: 0 Requires: textutils diffutils patch gzip bzip2 perl mktemp Autoreqprov: off Source: quilt-%{version}.tar.gz @@ -58,5 +49,5 @@ make install prefix=/usr BUILD_ROOT=$RPM_BUILD_ROOT %doc README %changelog -# The changelog is kept in %{name}.changes +# The changelog is filled in by "make spec". |