aboutsummaryrefslogtreecommitdiff
path: root/packages/squashfs-tools-ng.spec
blob: d16b66aa3f4955a673e2444809d4d501e3df01e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
## Spec file to build squashf-tools-ng RPM package.

# OpenSUSE has no dist macro
%if 0%{suse_version} > 0
%global dist .sles%{suse_version}
%endif

Name: squashfs-tools-ng
Version: 1.0.2
Release: 1%{?dist}
License: GPLv3+
URL: https://github.com/AgentD/squashfs-tools-ng

Source0: https://github.com/AgentD/squashfs-tools-ng/archive/v%{version}/%{name}-%{version}.tar.gz

Summary: New set of tools for working with SquashFS images
%description
SquashFS is a highly compressed read-only filesystem for Linux,
optimized for small size and high packing density. It is widely used
in embedded systems and bootable live media.

SquashFS supports many different compression formats, such as zstd,
xz, zlib or lzo for both data and metadata compression. It has many
features expected from popular filesystems, such as extended
attributes and support for NFS export.

As the name suggests, this is not the original user space tooling for
SquashFS. Here are some of the features that primarily distinguish
this package from the original:

 - reproducible SquashFS images, i.e. deterministic packing without
   any local time stamps,
 - Linux `gen_init_cpio` like file listing for micro managing the
   file system contents, permissions, and ownership without having to
   replicate the file system (and especially permissions) locally,
 - support for SELinux contexts file (see selabel_file(5)) to generate
   SELinux labels.


%if 0%{?el} > 7 || 0%{?fedora} >= 32 || 0%{?suse_version} >= 1500
%global use_zstd 1
%endif



# rpm-build / rpmdevtools
BuildRequires: gcc
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: libtool
BuildRequires: doxygen
BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: lzo-devel
BuildRequires: libattr-devel
# Need to be explicitly declared on Fedora
BuildRequires: make

# OpenSUSE has a different lz4 devel package name
%if 0%{?suse_version} > 0
BuildRequires: liblz4-devel
%else
BuildRequires: lz4-devel
%endif

%if 0%{?use_zstd}
BuildRequires: libzstd-devel
Requires: libzstd
%endif

Requires: %{name}-lib%{?_isa} = %{version}-%{release}
Requires: zlib
Requires: xz
Requires: lzo
Requires: libattr
Requires: lz4

#Recommends: squashfs-tools
   
%package        lib
Summary:        New set of tools for working with SquashFS images - shared library
Group:          System Environment/Libraries
%description     lib
This package contains the C libraries needed to run executables that
use the squashfs-tools-ng library.
 
%package        devel
Summary:        New set of tools for working with SquashFS images - development
Group:          Development/Libraries
Requires:       %{name}-lib = %{version}-%{release}
%description    devel
This package contains the C development headers and library files
needed to compile programs using the squashfs-tools-ng library.
   
%package        devel-doc
Summary:        New set of tools for working with SquashFS images - documentation
Group:          Development/Libraries
%description    devel-doc
This package contains the C development documentation files for the
the squashfs-tools-ng library.

%prep
%setup -q
%autosetup
%build
./autogen.sh
%configure
make %{?_smp_mflags}
make doxygen-doc
%install
%make_install


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%doc COPYING.md CHANGELOG.md README.md


%files lib
%defattr(-,root,root,-)
%{_libdir}/*.so*

%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/pkgconfig/*.pc

%files devel-doc
%defattr(-,root,root,-)
%doc doxygen-doc/html
%doc doxygen-doc/*.tag


%changelog
* Thu Oct 01 2020 Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org> - 1.0.2-1
- Add Fedora support.
- Add OpenSUSE support.
- Bump to version 1.0.2.
* Thu Aug 20 2020 Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org> - 1.0.1-1
- First package release.