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.
This commit is contained in:
parent
5034bf3a9d
commit
b38fb802f9
22
Makefile.am
22
Makefile.am
|
|
@ -113,28 +113,6 @@ release-tarball-embedded:
|
||||||
mv ostree-embeddeps-$${GITVERSION}.tar{.tmp,}; \
|
mv ostree-embeddeps-$${GITVERSION}.tar{.tmp,}; \
|
||||||
gzip -f ostree-embeddeps-$${GITVERSION}.tar
|
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:
|
check-local:
|
||||||
@echo " *** NOTE ***"
|
@echo " *** NOTE ***"
|
||||||
@echo " *** NOTE ***"
|
@echo " *** NOTE ***"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
||||||
# Define this if we want to build with embedded dependencies
|
|
||||||
# for e.g. RHEL6
|
|
||||||
%define enable_embedded_dependencies 0
|
|
||||||
|
|
||||||
%if 0%{?enable_embedded_dependencies}
|
|
||||||
%define build_name ostree-embeddeps
|
|
||||||
%else
|
|
||||||
%define build_name ostree
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?rhel}
|
|
||||||
# HACK to fix building on RHEL6; find_debuginfo is crashing, not sure
|
|
||||||
# why
|
|
||||||
%define debug_package %{nil}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Summary: Linux-based operating system develop/build/deploy tool
|
|
||||||
Name: ostree
|
|
||||||
Version: 2012.8
|
|
||||||
Release: 1%{?dist}
|
|
||||||
#VCS: git:git://git.gnome.org/ostree
|
|
||||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/ostree/%{version}/%{build_name}-%{version}.tar.gz
|
|
||||||
# The libostree.so (currently private) shared library, and almost all
|
|
||||||
# of the utilities are licensed under the LGPLv2+. Only at present
|
|
||||||
# one utility program (ostree-switch-root) is forked from util-linux under
|
|
||||||
# the GPL.
|
|
||||||
# The BSD is there basically just for some random scripts, nothing
|
|
||||||
# important.
|
|
||||||
# As always, consult the upstream COPYING file, and individual source
|
|
||||||
# files for the canonical license status.
|
|
||||||
License: LGPLv2+ and GPLv2+ and BSD
|
|
||||||
URL: http://live.gnome.org/OSTree
|
|
||||||
# We always run autogen.sh
|
|
||||||
BuildRequires: autoconf automake libtool
|
|
||||||
# Too bad there isn't a pkg-config file =(
|
|
||||||
BuildRequires: libattr-devel
|
|
||||||
# For docs
|
|
||||||
BuildRequires: gtk-doc
|
|
||||||
|
|
||||||
Requires: linux-user-chroot
|
|
||||||
|
|
||||||
# Embedded GLib dependencies
|
|
||||||
%if 0%{?enable_embedded_dependencies}
|
|
||||||
BuildRequires: glibc-devel
|
|
||||||
BuildRequires: pkgconfig(libffi)
|
|
||||||
BuildRequires: python-devel
|
|
||||||
BuildRequires: pkgconfig(zlib)
|
|
||||||
BuildRequires: pkgconfig(libselinux)
|
|
||||||
|
|
||||||
# Embedded libsoup dependencies
|
|
||||||
BuildRequires: gnome-common
|
|
||||||
BuildRequires: intltool
|
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
|
||||||
%else
|
|
||||||
BuildRequires: pkgconfig(gio-unix-2.0)
|
|
||||||
BuildRequires: pkgconfig(libsoup-2.4)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
|
||||||
See http://live.gnome.org/OSTree
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q -n %{build_name}-%{version}
|
|
||||||
|
|
||||||
%build
|
|
||||||
env NOCONFIGURE=1 ./autogen.sh
|
|
||||||
%if 0%{?enable_embedded_dependencies}
|
|
||||||
%define embedded_dependencies_option --enable-embedded-dependencies
|
|
||||||
%else
|
|
||||||
%define embedded_dependencies_option %{nil}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%configure --disable-silent-rules \
|
|
||||||
--enable-documentation \
|
|
||||||
--disable-libarchive \
|
|
||||||
%{embedded_dependencies_option}
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files
|
|
||||||
%doc COPYING README.md
|
|
||||||
%{_bindir}/ostree
|
|
||||||
%{_bindir}/ostree-pull
|
|
||||||
%{_bindir}/ostree-run-triggers
|
|
||||||
%{_sbindir}/ostree-switch-root
|
|
||||||
%{_libexecdir}/ostreed
|
|
||||||
%dir %{_libdir}/ostree
|
|
||||||
%{_libdir}/ostree/*.so
|
|
||||||
%if 0%{?enable_embedded_dependencies}
|
|
||||||
%{_libdir}/ostree/libglib*.so*
|
|
||||||
%{_libdir}/ostree/libgmodule*.so*
|
|
||||||
%{_libdir}/ostree/libgobject*.so*
|
|
||||||
%{_libdir}/ostree/libgthread*.so*
|
|
||||||
%{_libdir}/ostree/libgio*.so*
|
|
||||||
%{_libdir}/ostree/libsoup*.so*
|
|
||||||
%endif
|
|
||||||
%dir %{_libexecdir}/ostree
|
|
||||||
%dir %{_libexecdir}/ostree/triggers.d
|
|
||||||
%{_libexecdir}/ostree/triggers.d/*
|
|
||||||
%{_mandir}/man1/*.gz
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
git_version=$(git describe)
|
|
||||||
git_version_rpm=$(echo ${git_version} | sed -e 's,-,\.,g' -e 's,^v,,')
|
|
||||||
exec sed -e "s,^Version:.*,Version: ${git_version_rpm}," "$@"
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
enable ostree-remount.service
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue