]> git.pld-linux.org Git - packages/afflib.git/blob - afflib.spec
3a9966b80930309e0986100dc2e5a1b04c1daff8
[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:        3
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:       libmd-devel
64 Requires:       openssl-devel
65 Requires:       pkgconfig
66
67 %description    devel
68 The %{name}-devel package contains libraries and header files for
69 developing applications that use %{name}.
70
71 %package static
72 Summary:        Static %{name} library
73 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
74 Group:          Development/Libraries
75 Requires:       %{name}-devel = %{version}-%{release}
76
77 %description static
78 Static %{name} library.
79
80 %description static -l pl.UTF-8
81 Statyczna biblioteka %{name}.
82
83 %package python
84 Summary:        Python bindings for AFFLIB
85 Group:          Libraries/Python
86 Requires:       %{name} = %{version}-%{release}
87
88 %description python
89 These bindings currently support a read-only file-like interface to
90 AFFLIB and basic metadata accessor functions. The binding is not
91 currently complete.
92
93 %prep:
94 %setup -q -n AFFLIBv3-%{version}
95 %patch0 -p1
96 %patch1 -p1
97
98 %if %{with system_lzma}
99         # prevent internal lzma to be built - testing
100         #rm -rf lzma443
101 %else
102         #fix spurious permissions with lzma443
103         find lzma443 -type f -exec chmod 0644 {} ';'
104 %endif
105
106 %build
107 %{__libtoolize}
108 %{__aclocal}
109 %{__autoconf}
110 %{__autoheader}
111 %{__automake}
112 %configure \
113         %{__enable_disable fuse} \
114         %{__enable_disable python} \
115         %{__enable_disable s3} \
116         %{__enable_disable qemu}
117
118 %{__make}
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122 %{__make} install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 %if %{with python}
126 %py_postclean
127 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/*.egg-info/
128 %endif
129
130 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %post   -p /sbin/ldconfig
136 %postun -p /sbin/ldconfig
137
138 %files
139 %defattr(644,root,root,755)
140 %doc AUTHORS BUGLIST.txt ChangeLog NEWS README doc/announce_2.2.txt COPYING
141 %attr(755,root,root) %{_libdir}/libafflib.so.*.*.*
142 %attr(755,root,root) %ghost %{_libdir}/libafflib.so.0
143
144 %files -n afftools
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_bindir}/aff*
147 %{_mandir}/man1/aff*.1.*
148
149 %files devel
150 %defattr(644,root,root,755)
151 %doc doc/crypto_design.txt doc/crypto_doc.txt
152 %attr(755,root,root) %{_libdir}/libafflib.so
153 %{_includedir}/afflib/
154 %{_pkgconfigdir}/afflib.pc
155
156 %if %{with static_libs}
157 %files static
158 %defattr(644,root,root,755)
159 %{_libdir}/libafflib.a
160 %endif
161
162 %files python
163 %defattr(644,root,root,755)
164 %doc pyaff/README
165 %attr(755,root,root) %{py_sitedir}/pyaff.so
This page took 0.11136 seconds and 2 git commands to generate.