diff options
author | Frederic Lepied <flepied@mandriva.com> | 2003-03-19 21:09:19 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2003-03-19 21:09:19 +0000 |
commit | d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6 (patch) | |
tree | 5495515612292a62da9ab2d2fcd166279510edb0 | |
parent | 1b2a2a7416303be1c5df9614ebf7fd1ba9b2a2ba (diff) | |
download | ldetect-lst-d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6.tar ldetect-lst-d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6.tar.gz ldetect-lst-d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6.tar.bz2 ldetect-lst-d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6.tar.xz ldetect-lst-d1c63791b4427df5da3e17c4e4ea4ddeb4cab7b6.zip |
added support for standard rpm and localrpm targets.
-rw-r--r-- | Makefile | 55 | ||||
-rw-r--r-- | ldetect-lst.spec | 4 |
2 files changed, 44 insertions, 15 deletions
@@ -1,6 +1,11 @@ include Makefile.config -RPM ?= $(HOME)/rpm +PACKAGE = ldetect-lst +VERSION := $(shell rpm -q --qf '%{VERSION}\n' --specfile $(PACKAGE).spec | head -1) +RELEASE := $(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec | head -1) +TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') + +FILES = AUTHORS ChangeLog Makefile Makefile.config convert err ldetect-lst.spec lst update-ldetect-lst build: make -C lst build @@ -18,20 +23,44 @@ install: build install update-ldetect-lst $(sbindir) install convert/merge2pcitable.pl $(bindir) -rpm: srpm - rpm -bb --clean --rmsource --rmspec $(RPM)/SPECS/$(project).spec - cvs commit +# rules to build a test rpm + +localrpm: localdist buildrpm + +localdist: cleandist dir localcopy tar + +cleandist: + rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2 + +dir: + mkdir $(PACKAGE)-$(VERSION) + +localcopy: + tar c $(FILES) | tar x -C $(PACKAGE)-$(VERSION) -srpm: check clean $(RPM) - cvs update - (echo "# !! DON'T MODIFY HERE, MODIFY IN THE CVS !!" ; \ - cat $(project).spec \ - ) > $(RPM)/SPECS/$(project).spec +tar: + tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION) + bzip2 -9vf $(PACKAGE)-$(VERSION).tar + rm -rf $(PACKAGE)-$(VERSION) - (cd .. ; tar cfj $(RPM)/SOURCES/$(project).tar.bz2 $(project)) - rpm -bs $(RPM)/SPECS/$(project).spec +buildrpm: + rpm -ta $(PACKAGE)-$(VERSION).tar.bz2 -changelog: - cvs2cl -U ../common/username -I ChangeLog -W 400 +# rules to build a distributable rpm + +rpm: changelog cvstag dist buildrpm + +dist: cleandist dir export tar + +export: + cvs export -d $(PACKAGE)-$(VERSION) -r $(TAG) $(PACKAGE) + +cvstag: + cvs tag $(CVSTAGOPT) $(TAG) + +changelog: ../common/username + cvs2cl -U ../common/username -I ChangeLog rm -f ChangeLog.bak cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog + +# Makefile ends here diff --git a/ldetect-lst.spec b/ldetect-lst.spec index ae45d9c5..a7ab426e 100644 --- a/ldetect-lst.spec +++ b/ldetect-lst.spec @@ -7,7 +7,7 @@ Version: %{version} Release: %{release} Summary: Hardware list for the light detection library URL: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/ldetect-lst/ -Source: %{name}.tar.bz2 +Source: %{name}-%{version}.tar.bz2 Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-buildroot License: GPL @@ -29,7 +29,7 @@ table to get hardware autodetection see ldetect-lst %prep -%setup -q -n %{name} +%setup -q %build %make |