[ostree] packaging: Update infrastructure
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] packaging: Update infrastructure
- Date: Sat, 18 Jan 2014 09:49:52 +0000 (UTC)
commit b38fb802f9a21fd59a731a6d77bf650c8e7c6d15
Author: Colin Walters <walters verbum org>
Date: Sat Jan 18 04:44:54 2014 -0500
packaging: Update infrastructure
The Makefile.dist-packaging lives canonically in rpm-ostree/ for now,
it's my latest hack to automate git -> (s)rpm.
Update the spec.in from current Fedora.
Makefile.am | 22 -------
Makefile.dist-packaging | 39 +++++++++++++
packages/ostree.spec.in | 105 ----------------------------------
packages/substitute-gitversion.sh | 7 --
packaging/91-ostree.preset | 1 +
packaging/ostree.spec.in | 92 +++++++++++++++++++++++++++++
{packages => packaging}/rpmbuild-cwd | 0
7 files changed, 132 insertions(+), 134 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 451237f..b20738a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -113,28 +113,6 @@ release-tarball-embedded:
mv ostree-embeddeps-$${GITVERSION}.tar{.tmp,}; \
gzip -f ostree-embeddeps-$${GITVERSION}.tar
-srpm:
- GITVERSION=$(git_version_rpm); export GITVERSION; \
- $(srcdir)/packages/substitute-gitversion.sh $(srcdir)/packages/ostree.spec.in > ostree.spec
- $(srcdir)/packages/rpmbuild-cwd -bs ostree.spec
-
-dist-snapshot:
- set -x; \
- GITVERSION=$(git_version_rpm); export GITVERSION; \
- TARFILE_TMP=ostree-$${GITVERSION}.tar.tmp; \
- REV=$$(git rev-parse HEAD); \
- echo "Archiving ostree at $${REV}"; \
- (cd $(srcdir); git archive --format=tar --prefix=ostree-$${GITVERSION}/ $${REV}) > $${TARFILE_TMP}; \
- (cd $$(git rev-parse --show-toplevel); git submodule status) | while read line; do \
- rev=$$(echo $$line | cut -f 1 -d ' '); path=$$(echo $$line | cut -f 2 -d ' '); \
- echo "Archiving $${path} at $${rev}"; \
- (cd $(srcdir)/$$path; git archive --format=tar --prefix=ostree-$${GITVERSION}/$$path/ $${rev}) >
submodule.tar; \
- tar -A -f $${TARFILE_TMP} submodule.tar; \
- rm submodule.tar; \
- done; \
- mv ostree-$${GITVERSION}.tar{.tmp,}; \
- gzip -f ostree-$${GITVERSION}.tar
-
check-local:
@echo " *** NOTE ***"
@echo " *** NOTE ***"
diff --git a/Makefile.dist-packaging b/Makefile.dist-packaging
new file mode 100644
index 0000000..75a52f6
--- /dev/null
+++ b/Makefile.dist-packaging
@@ -0,0 +1,39 @@
+# -*- mode: Makefile -*-
+
+GITREV = $$(git describe --always --tags)
+GITREV_FOR_PKG = $(shell echo "$(GITREV)" | sed -e 's,-,\.,g' -e 's,^v,,')
+
+srcdir=$(shell pwd)
+PACKAGE=$(shell basename $(srcdir))
+
+PKG_VER = $(PACKAGE)-$(GITREV_FOR_PKG)
+
+dist-snapshot:
+ set -x; \
+ echo "PACKAGE=$(PACKAGE)"; \
+ TARFILE_TMP=$(PKG_VER).tar.tmp; \
+ echo "Archiving $(PACKAGE) at $(GITREV)"; \
+ (cd $(srcdir); git archive --format=tar --prefix=$(PKG_VER)/ $(GITREV)) > $${TARFILE_TMP}; \
+ (cd $$(git rev-parse --show-toplevel); git submodule status) | while read line; do \
+ rev=$$(echo $$line | cut -f 1 -d ' '); path=$$(echo $$line | cut -f 2 -d ' '); \
+ echo "Archiving $${path} at $${rev}"; \
+ (cd $(srcdir)/$$path; git archive --format=tar --prefix=$(PKG_VER)/$$path/ $${rev}) >
submodule.tar; \
+ tar -A -f $${TARFILE_TMP} submodule.tar; \
+ rm submodule.tar; \
+ done; \
+ mv $(PKG_VER).tar{.tmp,}; \
+ rm -f $(PKG_VER).tar.xz; \
+ xz $(PKG_VER).tar
+
+srpm: dist-snapshot
+ (cd $(srcdir)/packaging; \
+ cp ../$(PKG_VER).tar.xz . ; \
+ sed -e "s,^Version:.*,Version: $(GITREV_FOR_PKG)," $(PACKAGE).spec.in > $(PACKAGE).spec; \
+ ./rpmbuild-cwd -bs $(PACKAGE).spec)
+
+rpm: srpm
+ $(srcdir)/packaging/rpmbuild-cwd --rebuild packaging/$(PKG_VER)*.src.rpm
+
+buildinstall: rpm
+ sudo yum localinstall $(PKG_VER)*.src.rpm
+
diff --git a/packaging/91-ostree.preset b/packaging/91-ostree.preset
new file mode 100644
index 0000000..ad0970b
--- /dev/null
+++ b/packaging/91-ostree.preset
@@ -0,0 +1 @@
+enable ostree-remount.service
diff --git a/packaging/ostree.spec.in b/packaging/ostree.spec.in
new file mode 100644
index 0000000..8c28467
--- /dev/null
+++ b/packaging/ostree.spec.in
@@ -0,0 +1,92 @@
+Summary: Git for operating system binaries
+Name: ostree
+Version: 2013.7
+Release: 2%{?dist}
+#VCS: git:git://git.gnome.org/ostree
+Source0: http://ftp.gnome.org/pub/GNOME/sources/ostree/%{version}/ostree-%{version}.tar.xz
+Source1: 91-ostree.preset
+License: LGPLv2+
+URL: http://live.gnome.org/OSTree
+
+# We always run autogen.sh
+BuildRequires: autoconf automake libtool
+# For docs
+BuildRequires: gtk-doc
+# Core requirements
+BuildRequires: pkgconfig(gio-unix-2.0)
+BuildRequires: pkgconfig(libsoup-2.4)
+BuildRequires: libattr-devel
+# Extras
+BuildRequires: pkgconfig(libarchive)
+BuildRequires: gpgme-devel
+BuildRequires: pkgconfig(systemd)
+BuildRequires: /usr/bin/g-ir-scanner
+BuildRequires: dracut
+
+# Runtime requirements
+Requires: dracut
+Requires: systemd-units
+
+%description
+OSTree is a tool for managing bootable, immutable, versioned
+filesystem trees. While it takes over some of the roles of tradtional
+"package managers" like dpkg and rpm, it is not a package system; nor
+is it a tool for managing full disk images. Instead, it sits between
+those levels, offering a blend of the advantages (and disadvantages)
+of both.
+
+%package devel
+Summary: Development headers for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package includes the header files for the %{name} library.
+
+%prep
+%setup -q -n ostree-%{version}
+
+%build
+env NOCONFIGURE=1 ./autogen.sh
+%configure --disable-silent-rules \
+ --enable-gtk-doc \
+ --disable-libarchive \
+ --with-dracut
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
+find $RPM_BUILD_ROOT -name '*.la' -delete
+install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system-preset/91-ostree.preset
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%systemd_post ostree-remount.service
+
+%preun
+%systemd_preun ostree-remount.service
+
+%files
+%doc COPYING README.md
+%{_bindir}/ostree
+%{_sbindir}/ostree-prepare-root
+%{_sbindir}/ostree-remount
+%{_sysconfdir}/dracut.conf.d/ostree.conf
+%dir %{_prefix}/lib/dracut/modules.d/98ostree
+%{_prefix}/lib/systemd/system/ostree*.service
+%{_prefix}/lib/dracut/modules.d/98ostree/*
+%{_libdir}/*.so.1*
+%{_libdir}/girepository-1.0/OSTree-1.0.typelib
+%{_mandir}/man1/*.gz
+%{_prefix}/lib/systemd/system-preset/91-ostree.preset
+
+%files devel
+%{_libdir}/lib*.so
+%{_includedir}/*
+%{_libdir}/pkgconfig/*
+%{_datadir}/ostree
+%dir %{_datadir}/gtk-doc/html/ostree
+%{_datadir}/gtk-doc/html/ostree
+%{_datadir}/gir-1.0/OSTree-1.0.gir
diff --git a/packages/rpmbuild-cwd b/packaging/rpmbuild-cwd
similarity index 100%
rename from packages/rpmbuild-cwd
rename to packaging/rpmbuild-cwd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]