Blame bcache-tools.spec

Rolf Fokkens a22525a
%global gitdate 20130827
Rolf Fokkens a22525a
Rolf Fokkens a22525a
Summary: Tools for Linux kernel block layer cache
Rolf Fokkens a22525a
Name: bcache-tools
Rolf Fokkens a22525a
Version: 0
Rolf Fokkens ebd08ae
Release: 0.10.%{gitdate}git%{?dist}
Rolf Fokkens a22525a
License: GPLv2
Rolf Fokkens a22525a
Group: System Environment/Base
Rolf Fokkens a22525a
URL: http://bcache.evilpiepirate.org/
Rolf Fokkens a22525a
VCS: http://evilpiepirate.org/git/bcache-tools.git
Rolf Fokkens a22525a
# For now I am using a prerelease version obtained by:
Rolf Fokkens a22525a
# git clone http://evilpiepirate.org/git/bcache-tools.git
Rolf Fokkens a22525a
# cd bcache-tools/
Rolf Fokkens a22525a
# git archive --format=tar --prefix=bcache-tools-20130827/ 8327108eeaf3e0491b17d803da164c0827aae622 | gzip > ../bcache-tools-20130827.tar.bz
Rolf Fokkens a22525a
Source0: %{name}-%{gitdate}.tar.bz
Rolf Fokkens a22525a
# This part is also a prerelease version obtained by https://gist.github.com/djwong/6343451:
Rolf Fokkens a22525a
# git clone https://gist.github.com/6343451.git
Rolf Fokkens a22525a
# cd 6343451/
Rolf Fokkens a22525a
# git archive --format=tar --prefix=bcache-status-20130826/ 95fe51dd30e579d5786a8cbf54ee47df0b347250 | gzip > ../bcache-status-20130826.tar.gz
Rolf Fokkens a22525a
# see also http://article.gmane.org/gmane.linux.kernel.bcache.devel/1951
Rolf Fokkens a22525a
Source1: bcache-status-20130826.tar.gz
Rolf Fokkens a22525a
# bcache status not provided as a true package, so this is a self maintained man page for it
Rolf Fokkens a22525a
# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
Rolf Fokkens a22525a
Patch0: %{name}-status-20130826-man.patch
Rolf Fokkens a22525a
# Sent upstream: http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
Rolf Fokkens a22525a
Patch1: bcache-status-20130826-python.patch
Rolf Fokkens a22525a
# Sent upstream: http://article.gmane.org/gmane.linux.kernel.bcache.devel/1947
Rolf Fokkens a22525a
# This one can be left out when this is processed:
Rolf Fokkens a22525a
# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1953
Rolf Fokkens a22525a
Patch2: %{name}-20130827-register.patch
Rolf Fokkens a22525a
# configure and make install are not "Fedora compliant", do a small step in the
Rolf Fokkens a22525a
# right direction
Rolf Fokkens a22525a
Patch3: %{name}-20130827-fedconfmake.patch
Rolf Fokkens ebd08ae
# the udev interfacing is broken, but this fix is only temporary until
Rolf Fokkens ebd08ae
# util-linux (blkid) takes care of bcache superblock identification
Rolf Fokkens ebd08ae
Patch4: %{name}-20130827-udevfix.patch
Rolf Fokkens a22525a
Rolf Fokkens a22525a
Requires: python
Rolf Fokkens a22525a
BuildRequires: libuuid-devel systemd
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%description
Rolf Fokkens a22525a
Bcache is a Linux kernel block layer cache. It allows one or more fast disk
Rolf Fokkens a22525a
drives such as flash-based solid state drives (SSDs) to act as a cache for
Rolf Fokkens a22525a
one or more slower hard disk drives.
Rolf Fokkens a22525a
This package contains the utilities for manipulating bcache.
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%global _udevlibdir %{_prefix}/lib/udev
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%prep
Rolf Fokkens a22525a
%setup -q -n bcache-tools-%{gitdate}
Rolf Fokkens a22525a
tar xzf %{SOURCE1} --strip-components=1
Rolf Fokkens a22525a
%patch0 -p1 -b .man
Rolf Fokkens a22525a
%patch1 -p1 -b .python
Rolf Fokkens a22525a
%patch2 -p1 -b .register
Rolf Fokkens a22525a
%patch3 -p1 -b .fedconfmake
Rolf Fokkens a22525a
chmod +x configure
Rolf Fokkens ebd08ae
%patch4 -p1 -b .udevfix
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%build
Rolf Fokkens a22525a
%configure
Rolf Fokkens a22525a
make %{?_smp_mflags}
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%install
Rolf Fokkens a22525a
mkdir -p \
Rolf Fokkens a22525a
    %{buildroot}%{_sbindir} \
Rolf Fokkens a22525a
    %{buildroot}%{_mandir}/man8 \
Rolf Fokkens a22525a
    %{buildroot}%{_udevlibdir} \
Rolf Fokkens a22525a
    %{buildroot}%{_udevrulesdir}
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%make_install \
Rolf Fokkens a22525a
    SBINDIR=%{_sbindir} \
Rolf Fokkens a22525a
    UDEVRULESDIR=%{_udevrulesdir} \
Rolf Fokkens a22525a
    UDEVLIBDIR=%{_udevlibdir} \
Rolf Fokkens a22525a
    MANDIR=%{_mandir}
Rolf Fokkens a22525a
Rolf Fokkens a22525a
install -p  -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%files
Rolf Fokkens a22525a
%doc README COPYING
Rolf Fokkens a22525a
%{_udevrulesdir}/*
Rolf Fokkens a22525a
%{_mandir}/man8/*
Rolf Fokkens a22525a
%{_udevlibdir}/bcache-register
Rolf Fokkens a22525a
%{_sbindir}/bcache-super-show
Rolf Fokkens a22525a
%{_sbindir}/bcache-status
Rolf Fokkens a22525a
%{_sbindir}/make-bcache
Rolf Fokkens a22525a
%{_sbindir}/probe-bcache
Rolf Fokkens a22525a
Rolf Fokkens a22525a
%changelog
Rolf Fokkens ebd08ae
* Fri Sep 06 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.10.20130827git
Rolf Fokkens ebd08ae
- fixed some udev related issues (#1004693)
Rolf Fokkens ebd08ae
Rolf Fokkens a22525a
* Mon Sep 02 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.9.20130827git
Rolf Fokkens a22525a
- fedconfmake.spec file renamed to fedconfmake.patch
Rolf Fokkens a22525a
- removed libuuid as dependency
Rolf Fokkens a22525a
- removed trailing white-spaces in patch lines
Rolf Fokkens a22525a
- removed CFLAGS= from configure section
Rolf Fokkens a22525a
- removed (empty) check section
Rolf Fokkens a22525a
- replaced "make install" with make_install macro
Rolf Fokkens a22525a
- updated summary
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sat Aug 31 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.8.20130827git
Rolf Fokkens a22525a
- updated bcache-tools to commit 8327108eeaf3e0491b17d803da164c0827aae622
Rolf Fokkens a22525a
- corrected URL/VCS tag
Rolf Fokkens a22525a
- moved towards more RPM compliancy by using configure macro
Rolf Fokkens a22525a
- used "make install" to do most of the work
Rolf Fokkens a22525a
- added (empty) check section
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Mon Aug 26 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.7.20130820git
Rolf Fokkens a22525a
- updated bcache-status to latest upstream gist
Rolf Fokkens a22525a
- removed the -rules patch
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Mon Aug 26 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.6.20130820git
Rolf Fokkens a22525a
- removed tar and gcc from BuildRequires
Rolf Fokkens a22525a
- removed defattr from files section
Rolf Fokkens a22525a
- added upstream references to patches in comments 
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sun Aug 25 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.5.20130820git
Rolf Fokkens a22525a
- moved bcache-register to /usr/lib/udev
Rolf Fokkens a22525a
- suppress bcache-register error output (caused by registering device twice)
Rolf Fokkens a22525a
- removed man page for bcache-register
Rolf Fokkens a22525a
- added bcache-status
Rolf Fokkens a22525a
- added tar and gcc to BuildRequires
Rolf Fokkens a22525a
- added python to Requires
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Sat Aug 24 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.4.20130820git
Rolf Fokkens a22525a
- Fixed the udev rules for Fedora
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Thu Aug 22 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.3.20130820git
Rolf Fokkens a22525a
- Added systemd to BuildRequires
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Thu Aug 22 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.2.20130820git
Rolf Fokkens a22525a
- Fixed initial review feedback
Rolf Fokkens a22525a
Rolf Fokkens a22525a
* Tue Aug 20 2013 Rolf Fokkens <rolf@rolffokkens.nl> - 0-0.1.20130820git
Rolf Fokkens a22525a
- Initial build