]> git.pld-linux.org Git - packages/afflib.git/blob - afflib.spec
35414fc08db03260faa0bf4bbe40ef58e3adaecd
[packages/afflib.git] / afflib.spec
1 # TODO:
2 # - build against system lzma if possible
3 # - some bundled qemu source?
4 #
5 # Conditional build:
6 %bcond_without  fuse            # without FUSE support
7 %bcond_without  python          # without Python support
8 %bcond_with     system_lzma     # building against system lzma instead of local copy
9 %bcond_without  static_libs     # don't build static libraries
10 %bcond_without  s3              # without Amazon S3
11 %bcond_without  qemu            # without QEMU support
12 #
13 Summary:        Library to support the Advanced Forensic Format
14 Name:           afflib
15 Version:        3.7.18
16 Release:        2
17 License:        BSD with advertising
18 Group:          Libraries
19 Source0:        https://github.com/sshock/AFFLIBv3/archive/v%{version}.tar.gz
20 # Source0-md5:  079f7ff418a853d5e7462d09113bbe2f
21 Patch0:         Sanity-check-size-passed-to-malloc.patch
22 Patch1:         %{name}-x32-x64.patch
23 URL:            https://github.com/sshock/AFFLIBv3
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 %if %{with s3}
27 BuildRequires:  curl-devel
28 BuildRequires:  expat-devel
29 %endif
30 BuildRequires:  intltool
31 %if %{with fuse}
32 BuildRequires:  libfuse3-devel
33 %endif
34 BuildRequires:  libmd-devel
35 BuildRequires:  libstdc++-devel
36 BuildRequires:  libtool
37 %if %{with system_lzma}
38 BuildRequires:  lzma-devel
39 %endif
40 BuildRequires:  ncurses-devel
41 BuildRequires:  openssl-devel
42 BuildRequires:  python-devel
43 BuildRequires:  readline-devel
44 BuildRequires:  rpmbuild(macros) >= 1.527
45 BuildRequires:  zlib-devel
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 AFF® is an open and extensible file format designed to store disk
50 images and associated metadata. afflib is library for support of the
51 Advanced Forensic Format (AFF).
52
53 %package -n     afftools
54 Summary:        Utilities for %{name}
55 Requires:       %{name} = %{version}-%{release}
56
57 %description -n afftools
58 The %{name}-utils package contains utilities for using %{name}.
59
60 %package        devel
61 Summary:        Development files for %{name}
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       openssl-devel
64 Requires:       pkgconfig
65
66 %description    devel
67 The %{name}-devel package contains libraries and header files for
68 developing applications that use %{name}.
69
70 %package static
71 Summary:        Static %{name} library
72 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
73 Group:          Development/Libraries
74 Requires:       %{name}-devel = %{version}-%{release}
75
76 %description static
77 Static %{name} library.
78
79 %description static -l pl.UTF-8
80 Statyczna biblioteka %{name}.
81
82 %package python
83 Summary:        Python bindings for AFFLIB
84 Group:          Libraries/Python
85 Requires:       %{name} = %{version}-%{release}
86
87 %description python
88 These bindings currently support a read-only file-like interface to
89 AFFLIB and basic metadata accessor functions. The binding is not
90 currently complete.
91
92 %prep:
93 %setup -q -n AFFLIBv3-%{version}
94 %patch0 -p1
95 %patch1 -p1
96
97 %if %{with system_lzma}
98         # prevent internal lzma to be built - testing
99         #rm -rf lzma443
100 %else
101         #fix spurious permissions with lzma443
102         find lzma443 -type f -exec chmod 0644 {} ';'
103 %endif
104
105 %build
106 %{__libtoolize}
107 %{__aclocal}
108 %{__autoconf}
109 %{__autoheader}
110 %{__automake}
111 %configure \
112         %{__enable_disable fuse} \
113         %{__enable_disable python} \
114         %{__enable_disable s3} \
115         %{__enable_disable qemu}
116
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 %{__make} install \
122         DESTDIR=$RPM_BUILD_ROOT
123
124 %if %{with python}
125 %py_postclean
126 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/*.egg-info/
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post   -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
134
135 %files
136 %defattr(644,root,root,755)
137 %doc AUTHORS BUGLIST.txt ChangeLog NEWS README doc/announce_2.2.txt COPYING
138 %attr(755,root,root) %{_libdir}/libafflib.so.*
139
140 %files -n afftools
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_bindir}/aff*
143 %{_mandir}/man1/aff*.1.*
144
145 %files devel
146 %defattr(644,root,root,755)
147 %doc doc/crypto_design.txt doc/crypto_doc.txt
148 %attr(755,root,root) %{_libdir}/libafflib.so
149 %{_libdir}/*.la
150 %{_includedir}/afflib/
151 %{_pkgconfigdir}/afflib.pc
152
153 %if %{with static_libs}
154 %files static
155 %defattr(644,root,root,755)
156 %{_libdir}/libafflib.a
157 %endif
158
159 %files python
160 %defattr(644,root,root,755)
161 %doc pyaff/README
162 %attr(755,root,root) %{py_sitedir}/pyaff.so
This page took 0.1874 seconds and 2 git commands to generate.