Add a spec file and a make file to deal with it
This commit is contained in:
parent
dc06f38321
commit
ccbd9bac63
@ -6,4 +6,5 @@ include PLAN.*
|
|||||||
include README
|
include README
|
||||||
include TESTING
|
include TESTING
|
||||||
include ToDo
|
include ToDo
|
||||||
|
include pungi.spec
|
||||||
include config/*
|
include config/*
|
||||||
|
25
Makefile
Normal file
25
Makefile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PKGNAME=pungi
|
||||||
|
VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec)
|
||||||
|
RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec)
|
||||||
|
HGTAG=${PKGNAME}-$(VERSION)-$(RELEASE)
|
||||||
|
PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}"
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
all:
|
||||||
|
@echo "Nothing to do"
|
||||||
|
|
||||||
|
tag:
|
||||||
|
@hg tag -m "$(HGTAG)" $(HGTAG)
|
||||||
|
# @hg push
|
||||||
|
|
||||||
|
archive: tag
|
||||||
|
@rm -rf ${PKGNAME}-$(VERSION)/
|
||||||
|
@python setup.py sdist > /dev/null
|
||||||
|
@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.gz"
|
||||||
|
|
||||||
|
srpm: archive
|
||||||
|
@rm -f ${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm
|
||||||
|
@rpmbuild -bs ${PKGRPMFLAGS} ${PKGNAME}.spec
|
||||||
|
@echo "The srpm is in ${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm"
|
||||||
|
|
49
pungi.spec
Normal file
49
pungi.spec
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
|
|
||||||
|
Name: pungi
|
||||||
|
Version: 0.1.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Distribution compose tool
|
||||||
|
|
||||||
|
Group: Development/Tools
|
||||||
|
License: GPL
|
||||||
|
URL: http://linux.duke.edu/projects/%{name}
|
||||||
|
Source0: http://linux.duke.edu/projects/%{name}/release/%{name}-%{version}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
Requires: anaconda-runtime
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A tool to create anaconda based installation trees/isos of a set of rpms.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc Authors Changelog COPYING GPL PLAN.gather PLAN.pungi README ToDo
|
||||||
|
%config(noreplace) %{_sysconfdir}/pungi/*
|
||||||
|
# For noarch packages: sitelib
|
||||||
|
%{python_sitelib}/pungi/*
|
||||||
|
%{_bindir}/pungi
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Nov 8 2006 Jesse Keating <jkeating@redhat.com> - 0.1.0-1
|
||||||
|
- Initial spec
|
Loading…
Reference in New Issue
Block a user