1999-10-01 15:15:25 +08:00
|
|
|
#############################################################################
|
|
|
|
# File : Makefile
|
|
|
|
# Package : rpmlint
|
|
|
|
# Author : Frederic Lepied
|
|
|
|
# Created on : Mon Sep 30 13:20:18 1999
|
|
|
|
# Version : $Id$
|
|
|
|
# Purpose : rules to manage the files.
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
BINDIR=/usr/bin
|
|
|
|
LIBDIR=/usr/share/rpmlint
|
1999-10-16 19:10:52 +08:00
|
|
|
ETCDIR=/etc/rpmlint
|
|
|
|
|
2002-05-14 11:13:57 +08:00
|
|
|
FILES= rpmlint *.py AUTHORS INSTALL README README.CVS COPYING ChangeLog Makefile \
|
|
|
|
config rpmlint.spec rpmdiff
|
2001-05-18 23:07:26 +08:00
|
|
|
|
|
|
|
PACKAGE=rpmlint
|
2002-04-25 04:10:12 +08:00
|
|
|
VERSION:=$(shell rpm -q --qf %{VERSION} --specfile $(PACKAGE).spec)
|
|
|
|
RELEASE:=$(shell rpm -q --qf %{RELEASE} --specfile $(PACKAGE).spec)
|
2001-05-18 23:07:26 +08:00
|
|
|
TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__')
|
1999-10-01 15:15:25 +08:00
|
|
|
|
|
|
|
all:
|
2002-01-11 02:52:10 +08:00
|
|
|
./compile.py "$(LIBDIR)/" [A-Z]*.py
|
1999-10-01 15:15:25 +08:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.pyc *.pyo
|
|
|
|
|
|
|
|
install:
|
1999-10-16 19:10:52 +08:00
|
|
|
-mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(ETCDIR)
|
2002-03-09 03:08:16 +08:00
|
|
|
cp -p rpmdiff *.py *.pyo $(DESTDIR)$(LIBDIR)
|
2002-04-25 04:10:12 +08:00
|
|
|
if [ -z "$(POLICY)" ]; then \
|
|
|
|
sed -e 's/@VERSION@/$(VERSION)/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py ; \
|
|
|
|
else \
|
|
|
|
sed -e 's/@VERSION@/$(VERSION)/' -e 's/policy=None/policy="$(POLICY)"/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py; \
|
|
|
|
fi
|
1999-10-16 19:10:52 +08:00
|
|
|
cp -p rpmlint $(DESTDIR)$(BINDIR)
|
|
|
|
cp -p config $(DESTDIR)$(ETCDIR)
|
1999-10-01 15:15:25 +08:00
|
|
|
|
2001-11-15 00:33:03 +08:00
|
|
|
verify:
|
2002-02-10 08:46:28 +08:00
|
|
|
pychecker *.py
|
2001-11-15 00:33:03 +08:00
|
|
|
|
2002-04-25 04:10:12 +08:00
|
|
|
version:
|
|
|
|
@echo "$(VERSION)-$(RELEASE)"
|
|
|
|
|
2001-05-18 23:07:26 +08:00
|
|
|
# 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)
|
|
|
|
|
|
|
|
tar:
|
|
|
|
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
|
|
|
|
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
|
|
|
|
rm -rf $(PACKAGE)-$(VERSION)
|
|
|
|
|
|
|
|
buildrpm:
|
|
|
|
rpm -ta $(PACKAGE)-$(VERSION).tar.bz2
|
|
|
|
|
|
|
|
# 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)
|
1999-10-01 15:15:25 +08:00
|
|
|
|
2000-07-30 01:58:52 +08:00
|
|
|
changelog: ../common/username
|
|
|
|
cvs2cl -U ../common/username -I ChangeLog
|
|
|
|
rm -f ChangeLog.bak
|
|
|
|
cvs commit -m "Generated by cvs2cl the `date '+%d_%b'`" ChangeLog
|
|
|
|
|
1999-10-01 15:15:25 +08:00
|
|
|
# Makefile ends here
|