Blame SPECS/rpm-ostree.spec

ad8abb
%bcond_without bundled_libhif
ce65f3
Summary: Client side upgrade program and server side compose tool
ce65f3
Name: rpm-ostree
ad8abb
Version: 2016.3.1.g5bd7211
ad8abb
Release: 1.atomic%{?dist}
ce65f3
#VCS: https://github.com/cgwalters/rpm-ostree
ce65f3
# This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot"
ad8abb
# because github doesn't support placing submodules in tarballs and RPM
ad8abb
# doesn't understand git.
ce65f3
Source0: rpm-ostree-%{version}.tar.xz
ad8abb
# https://github.com/rpm-software-management/libhif
ad8abb
# Bundled because the library is API/ABI unstable, and we're trying to
ad8abb
# avoid being version locked with PackageKit/dnf right now.
ad8abb
# This source is generated via
ad8abb
#   git archive --format=tar --prefix=libhif/ 
ad8abb
%if %{with bundled_libhif}
ad8abb
Source1: libhif.tar.gz
ad8abb
Provides: bundled(libhif) = 0.7.0
ad8abb
%endif
ce65f3
License: LGPLv2+
c1ce34
URL: https://github.com/projectatomic/rpm-ostree
ad8abb
ce65f3
# We always run autogen.sh
ad8abb
BuildRequires: autoconf automake libtool git
ce65f3
# For docs
ad8abb
BuildRequires: chrpath
ce65f3
BuildRequires: gtk-doc
ce65f3
BuildRequires: gnome-common
ad8abb
BuildRequires: gobject-introspection
ad8abb
# Core requirements
ce65f3
BuildRequires: pkgconfig(ostree-1) >= 2015.1
ce65f3
BuildRequires: pkgconfig(libgsystem)
ce65f3
BuildRequires: pkgconfig(json-glib-1.0)
ce65f3
BuildRequires: pkgconfig(rpm)
ad8abb
BuildRequires: pkgconfig(libarchive)
ce65f3
BuildRequires: libcap-devel
c1ce34
BuildRequires: libattr-devel
ce65f3
ad8abb
# We currently interact directly with librepo
ad8abb
BuildRequires: pkgconfig(librepo)
ad8abb
ad8abb
# We're using RPATH to pick up our bundled version
ad8abb
%global __requires_exclude ^libhif[.]so[.].*$
ad8abb
ad8abb
%if %{with bundled_libhif}
ad8abb
BuildRequires: cmake
ad8abb
BuildRequires: pkgconfig(expat)
ad8abb
BuildRequires: pkgconfig(check)
ad8abb
BuildRequires: python-devel
ad8abb
BuildRequires: python-sphinx
ad8abb
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
ad8abb
BuildRequires: libsolv-devel
ad8abb
%else
ad8abb
BuildRequires: pkgconfig(libsolv)
ad8abb
%endif
ad8abb
%else
ad8abb
BuildRequires: pkgconfig(libhif)
ad8abb
%endif
ce65f3
ce65f3
%description
ce65f3
This tool binds together the world of RPM packages with the OSTree
ce65f3
model of bootable filesystem trees.  It provides commands usable both
ce65f3
on client systems as well as server-side composes.
ce65f3
88798c
%package devel
88798c
Summary: Development headers for %{name}
88798c
Group: Development/Libraries
88798c
Requires: %{name} = %{version}-%{release}
88798c
88798c
%description devel
88798c
The %{name}-devel package includes the header files for the %{name} library.
88798c
ce65f3
%prep
f13179
%autosetup -Sgit -n %{name}-%{version}
ad8abb
%if %{with bundled_libhif}
ad8abb
tar xf %{SOURCE1}
ad8abb
%endif
ce65f3
ce65f3
%build
ad8abb
%if %{with bundled_libhif}
ad8abb
(cd libhif
ad8abb
 cmake \
ad8abb
     -DCMAKE_INSTALL_PREFIX:PATH=%{_libexecdir}/rpm-ostree \
ad8abb
     -DINCLUDE_INSTALL_DIR:PATH=%{_libexecdir}/rpm-ostree/include \
ad8abb
     -DLIB_INSTALL_DIR:PATH=%{_libexecdir}/rpm-ostree \
ad8abb
     -DSYSCONF_INSTALL_DIR:PATH=%{_libexecdir}/rpm-ostree/etc \
ad8abb
     -DSHARE_INSTALL_PREFIX:PATH=%{_libexecdir}/rpm-ostree/share \
ad8abb
     -DLIB_SUFFIX=64 \
ad8abb
     -DBUILD_SHARED_LIBS:BOOL=ON .
ad8abb
 make %{?_smp_mflags}
ad8abb
 cat > libhif/libhif.pc<
ad8abb
Name: libhif
ad8abb
Description: Simple package manager interface and librepo
ad8abb
Version: 
ad8abb
Requires: glib-2.0, gobject-2.0, librepo, rpm
ad8abb
Libs: -L$(pwd)/libhif -lhif
ad8abb
Cflags: -I$(pwd) -I$(pwd)/libhif
ad8abb
EOF
ad8abb
)
ad8abb
export PKG_CONFIG_PATH=$(pwd)/libhif/libhif${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
ad8abb
export LD_LIBRARY_PATH=$(pwd)/libhif/libhif${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
ad8abb
%endif
ce65f3
env NOCONFIGURE=1 ./autogen.sh
ad8abb
%configure --disable-silent-rules --enable-gtk-doc LDFLAGS='-Wl,-rpath=%{_libdir}/rpm-ostree'
ce65f3
make %{?_smp_mflags}
ce65f3
ce65f3
%install
ad8abb
%if %{with bundled_libhif}
ad8abb
(cd libhif
ad8abb
 make install DESTDIR=$RPM_BUILD_ROOT
ad8abb
 for path in %{_libdir}/python2.7 %{_libexecdir}/rpm-ostree/include %{_libexecdir}/rpm-ostree/pkg-config \
ad8abb
	     %{_libexecdir}/rpm-ostree/share/man; do \
ad8abb
     rm $RPM_BUILD_ROOT/${path} -rf; \
ad8abb
 done
ad8abb
 install -d $RPM_BUILD_ROOT/%{_libdir}/rpm-ostree
ad8abb
 # Cherry pick the shared library...
ad8abb
 mv $RPM_BUILD_ROOT/%{_libexecdir}/rpm-ostree/lib*/libhif*.so.* $RPM_BUILD_ROOT/%{_libdir}/rpm-ostree
ad8abb
 # and nuke everything else.
ad8abb
 rm $RPM_BUILD_ROOT/%{_libexecdir}/rpm-ostree -rf
ad8abb
)
ad8abb
%endif
ce65f3
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
88798c
find $RPM_BUILD_ROOT -name '*.la' -delete
ce65f3
c1ce34
# I try to do continuous delivery via rpmdistro-gitoverlay while
c1ce34
# reusing the existing spec files.  Currently RPM only supports
c1ce34
# mandatory file entries.  What this is doing is making each file
c1ce34
# entry optional - if it exists it will be picked up.  That
c1ce34
# way the same spec file works more easily across multiple versions where e.g. an
c1ce34
# older version might not have a systemd unit file.
c1ce34
cat > autofiles.py <
c1ce34
#!/usr/bin/python
c1ce34
import os,sys,glob
c1ce34
os.chdir(os.environ['RPM_BUILD_ROOT'])
c1ce34
for line in sys.argv[1:]:
c1ce34
    if line == '':
c1ce34
        break
c1ce34
    if line[0] != '/':
c1ce34
        sys.stdout.write(line + '\n')
c1ce34
    else:
c1ce34
        files = glob.glob(line[1:])
c1ce34
        if len(files) > 0:
c1ce34
            sys.stderr.write('{0} matched {1} files\n'.format(line, len(files)))
c1ce34
            sys.stdout.write(line + '\n')
c1ce34
        else:
c1ce34
            sys.stderr.write('{0} did not match any files\n'.format(line))
c1ce34
EOF
c1ce34
python autofiles.py > files \
c1ce34
  '%{_bindir}/*' \
c1ce34
  '%{_libdir}/%{name}' \
c1ce34
  '%{_libdir}/*.so.*' \
c1ce34
  '%{_mandir}/man*/*' \
c1ce34
  '%{_libdir}/girepository-1.0/*.typelib' \
c1ce34
  '%{_sysconfdir}/dbus-1/system.d/*' \
c1ce34
  '%{_prefix}/lib/systemd/system/*' \
c1ce34
  '%{_libexecdir}/rpm-ostree*' \
c1ce34
  '%{_datadir}/dbus-1/system-services'
c1ce34
python autofiles.py > files.devel \
c1ce34
  '%{_libdir}/lib*.so' \
c1ce34
  '%{_includedir}/*' \
c1ce34
  '%{_libdir}/pkgconfig/*' \
c1ce34
  '%{_datadir}/gtk-doc/html/*' \
c1ce34
  '%{_datadir}/gir-1.0/*-1.0.gir'
c1ce34
c1ce34
%files -f files
ce65f3
%doc COPYING README.md
88798c
c1ce34
%files devel -f files.devel
ce65f3
ce65f3
%changelog
ad8abb
* Tue Jun 14 2016 Colin Walters <walters@redhat.com> - 2016.3-3.atomic
ad8abb
- New upstream version
ad8abb
ad8abb
* Tue Apr 19 2016 Colin Walters <walters@redhat.com> - 2016.1-2.atomic
ad8abb
- New upstream version
ad8abb
c1ce34
* Tue Jan 12 2016 Colin Walters <walters@redhat.com> - 2015.11-2.atomic
c1ce34
- New upstream version
c1ce34
  Resolves: #1291841
c1ce34
  Resolves: #1274070
c1ce34
c1ce34
* Tue Oct 06 2015 Colin Walters <walters@redhat.com> - 2015.9-2.atomic
c1ce34
- New upstream version
c1ce34
c1ce34
* Fri Sep 25 2015 Colin Walters <walters@redhat.com> - 2015.5-3.atomic
c1ce34
- Rebuild
c1ce34
88798c
* Mon May 18 2015 Colin Walters <walters@redhat.com> - 2015.5-2.atomic
88798c
- Rebuild against latest libhif
88798c
88798c
* Fri May 15 2015 Colin Walters <walters@redhat.com> - 2015.5-1.atomic
88798c
- Rebase to Fedora rawhide
88798c
88798c
* Wed May 13 2015 Colin Walters <walters@redhat.com> - 2015.3-4.atomic
88798c
- Drop /usr/bin/atomic like we did for -client; this fixes installing
88798c
  with the new atomic package.
88798c
f13179
* Fri Apr 17 2015 Colin Walters <walters@redhat.com> - 2015.3-3.atomic
f13179
- Backport client side GPG verification status patches
f13179
ce65f3
* Fri Jan 23 2015 Colin Walters <walters@redhat.com> - 2015.3-2.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Fri Jan 09 2015 Colin Walters <walters@redhat.com> - 2015.2-2.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Fri Dec 19 2014 Colin Walters <walters@redhat.com> - 2014.114-2.atomic
ce65f3
- Rebuild for 7.1
ce65f3
ce65f3
* Fri Dec 05 2014 Colin Walters <walters@redhat.com> - 2014.114-1.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Thu Nov 20 2014 Colin Walters <walters@redhat.com> - 2014.111-2.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Fri Oct 24 2014 Colin Walters <walters@redhat.com> - 2014.109-1.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Thu Oct 16 2014 Colin Walters <walters@redhat.com>
ce65f3
- New upstream version
ce65f3
ce65f3
* Tue Oct 07 2014 Colin Walters <walters@redhat.com> - 2014.107-2.atomic
ce65f3
- New upstream version
ce65f3
ce65f3
* Mon Sep 29 2014 Colin Walters <walters@redhat.com> - 2014.106-4.atomic
ce65f3
- rebuilt
ce65f3
ce65f3
* Mon Sep 29 2014 Colin Walters <walters@redhat.com> - 2014.106-3.atomic
ce65f3
- rebuilt
ce65f3
ce65f3
* Tue Sep 09 2014 Colin Walters <walters@redhat.com> - 2014.106-2.atomic
ce65f3
- New upstream release
ce65f3
- BR/R OSTree 2014.6
ce65f3
ce65f3
* Fri Aug 08 2014 Colin Walters <walters@redhat.com> - 2014.105-2.atomic
ce65f3
- New upstream release
ce65f3
ce65f3
* Mon Jul 14 2014 Colin Walters <walters@redhat.com>
ce65f3
- New upstream version
ce65f3
ce65f3
* Fri May 23 2014 Colin Walters <walters@redhat.com>
ce65f3
- Previous autobuilder code is split off into rpm-ostree-toolbox
ce65f3
ce65f3
* Sat Mar 22 2014 Colin Walters <walters@verbum.org> - 2014.6.3.g5707fa7-1
ce65f3
- New git snapshot, add rpm-ostree-sign to file list
ce65f3
ce65f3
* Sat Mar 22 2014 Colin Walters <walters@verbum.org> - 2014.6-1
ce65f3
- New upstream version
ce65f3
ce65f3
* Fri Mar 07 2014 Colin Walters <walters@verbum.org> - 2014.5-1
ce65f3
- Initial package
ce65f3