File nilfs-utils.spec of Package nilfs-utils
#
# spec file for package nilfs-utils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define build_devel_pkg 0
Name: nilfs-utils
BuildRequires: libmount-devel
BuildRequires: libtool
BuildRequires: libuuid-devel
Summary: Utilities for NILFS
License: GPL-2.0
Group: System/Filesystems
Version: 2.1.4
Release: 0
Source: %{name}-%{version}.tar.bz2
Url: http://www.nilfs.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains utility programs for NILFS v2.
%if %{build_devel_pkg}
%package devel
Summary: Development package for the libnilfs library
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
%description devel
This package contains the development files for NILFS v2.
%endif
%prep
%setup -q
%build
# autoreconf -fi
%configure --disable-static --enable-libmount
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT root_sbindir=/sbin root_libdir=/%{_lib}
# remove unneeded files
# rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%if !%{build_devel_pkg}
# remove devel files (not packaged for the time being)
rm -rf $RPM_BUILD_ROOT%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.so
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%config(noreplace) /etc/nilfs_cleanerd.conf
/sbin/*
%{_bindir}/*
%{_libdir}/libnilfs*.so.*
%{_mandir}/man?/*
%if %{build_devel_pkg}
%files devel
%defattr(-,root,root)
%{_includedir}/nilfs.h
%{_includedir}/nilfs_fs.h
%{_libdir}/libnilfs.so
%endif
%changelog