add install and clean targets to makefile. make the spec file be normal

instead of doing everything manually
This commit is contained in:
Jeremy Katz 2007-06-19 13:54:21 -04:00
parent 5b4d287b6b
commit 1b6281ab55
2 changed files with 13 additions and 9 deletions

View File

@ -7,6 +7,15 @@ CVSTAG = REDHAT_RPM_CONFIG_$(subst .,_,$(VERSION))
all: all:
clean:
rm -f *~
install:
mkdir -p $(DESTDIR)/usr/lib/rpm/redhat
cp -pr * $(DESTDIR)/usr/lib/rpm/redhat/
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
rm -f $(DESTDIR)/usr/lib/rpm/redhat/redhat-rpm-config.spec
tag-archive: tag-archive:
git-tag -a $(CVSTAG) git-tag -a $(CVSTAG)

View File

@ -4,10 +4,9 @@ Version: 8.1.0
Release: 1 Release: 1
License: GPL License: GPL
Group: Development/System Group: Development/System
Source: redhat-rpm-config-%{version}.tar.gz Source: redhat-rpm-config-%{version}.tar.bz2
BuildArch: noarch BuildArch: noarch
#Requires: rpmbuild(VendorConfig) <= 4.1 Requires: mktemp
#Requires: mktemp
BuildRoot: %{_tmppath}/%{name}-root BuildRoot: %{_tmppath}/%{name}-root
# rpmrc passes -mtune which first appeared in gcc 3.4 # rpmrc passes -mtune which first appeared in gcc 3.4
%ifarch i386 i686 sparc %ifarch i386 i686 sparc
@ -18,14 +17,10 @@ Conflicts: gcc < 3.4
Red Hat specific rpm configuration files. Red Hat specific rpm configuration files.
%prep %prep
%setup -q
%install %install
rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm
( cd ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm; tar xzf %{SOURCE0}; mv %{name}-%{version} redhat; rm -f redhat/*.spec )
# fix perms of config.{guess,sub}
chmod a+x ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm/redhat/config.{guess,sub}
%clean %clean
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}