From ccbd9bac63922aee67865c13d900234cb66d3e22 Mon Sep 17 00:00:00 2001 From: "jkeating@harpoon.lab.boston.redhat.com" <> Date: Wed, 8 Nov 2006 17:52:04 -0500 Subject: [PATCH] Add a spec file and a make file to deal with it --- MANIFEST.in | 1 + Makefile | 25 +++++++++++++++++++++++++ pungi.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 Makefile create mode 100644 pungi.spec diff --git a/MANIFEST.in b/MANIFEST.in index 15db3e49..422e3f93 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,4 +6,5 @@ include PLAN.* include README include TESTING include ToDo +include pungi.spec include config/* diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..9fce8410 --- /dev/null +++ b/Makefile @@ -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" + diff --git a/pungi.spec b/pungi.spec new file mode 100644 index 00000000..99f1eb56 --- /dev/null +++ b/pungi.spec @@ -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 - 0.1.0-1 +- Initial spec