File squashfuse.spec of Package squashfuse

#
# spec file for package squashfuse
#
# Copyright (c) 2014 Yarny
#
# 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 so_version 0

Name:           squashfuse
Version:        0.1.104
Release:        0
License:        BSD-2-Clause
Summary:        FUSE module to mount squashfs images
Url:            https://github.com/vasi/squashfuse
Group:          System/Filesystems
Source:         squashfuse-%{version}.tar.gz
Patch1: squashfuse_from_appimage.patch
Requires:       fuse
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  sed
BuildRequires:  pkg-config
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fuse-devel
BuildRequires:  libtool
BuildRequires:  libattr-devel
BuildRequires:  zlib-devel
BuildRequires:  xz-devel
BuildRequires:  lzo-devel
BuildRequires:  liblzma5

%description
Squashfuse is a FUSE filesystem that allows a
squashfs archive to be mounted in user-space.
It is designed to be fast and memory-efficient,
and supports most of the features of the squashfs format.

%package -n libsquashfuse%so_version
Summary:        FUSE module to mount squashfs images

%description -n libsquashfuse%so_version
Squashfuse is a FUSE filesystem that allows a
squashfs archive to be mounted in user-space.
It is designed to be fast and memory-efficient,
and supports most of the features of the squashfs format.

%package devel
Summary:        FUSE module to mount squashfs images
Requires: libsquashfuse%so_version = %version

%description devel
Squashfuse is a FUSE filesystem that allows a
squashfs archive to be mounted in user-space.
It is designed to be fast and memory-efficient,
and supports most of the features of the squashfs format.

This package contains development files.

%prep
%setup -q
%patch1 -p1

%build
autoreconf -fi
%configure
make %{?_smp_mflags}

%install
make DESTDIR="$RPM_BUILD_ROOT" install
mkdir -p %buildroot/usr/include/squashfuse
cp *.h -v %buildroot/usr/include/squashfuse
sed -e 's,^#include ",#include "squashfuse/,' \
    %buildroot/usr/include/squashfuse/squashfuse.h \
  > %buildroot/usr/include/squashfuse.h
sed -i 's,^Libs: \(.*\),Libs: \1 -llzo2,' \
    %buildroot%_libdir/pkgconfig/squashfuse.pc
rm %buildroot%_libdir/*.la

%files
%doc %{_mandir}/*/*
%license LICENSE
%{_bindir}/*

%files devel
%_libdir/*.a
%_libdir/*.so
%_libdir/libsquashfuse_ll.*
%_libdir/pkgconfig/*
%_includedir/squashfuse
%_includedir/squashfuse.h

%files -n libsquashfuse%{so_version}
%_libdir/libsquashfuse.so.%{so_version}
%_libdir/libsquashfuse.so.%{so_version}.*
%_libdir/libfuseprivate.so.%{so_version}
%_libdir/libfuseprivate.so.%{so_version}.*

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig

%post -n libsquashfuse%so_version
/sbin/ldconfig

%postun -n libsquashfuse%so_version
/sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by