]>
Commit | Line | Data |
---|---|---|
f7475230 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | # | |
6 | Summary: A tool to manage Windows dynamic disks | |
7 | Summary(pl.UTF-8): Narzędzie do zarządzania dynamicznymi dyskami Windows | |
8 | Name: libldm | |
9 | Version: 0.2.3 | |
bf93322a | 10 | Release: 3 |
f7475230 JB |
11 | License: LGPL v3+ (libldm), GPL v3+ (ldmtool) |
12 | Group: Libraries | |
13 | Source0: https://github.com/mdbooth/libldm/downloads/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: a7771c0a0f84dab6d7ce6a565ede4229 | |
15 | Patch0: %{name}-warnings.patch | |
bf93322a | 16 | Patch1: %{name}-gtype.patch |
f7475230 JB |
17 | URL: https://github.com/mdbooth/libldm/ |
18 | BuildRequires: autoconf >= 2.68 | |
19 | BuildRequires: automake >= 1.6 | |
20 | BuildRequires: device-mapper-devel >= 1.0 | |
21 | BuildRequires: glib2-devel >= 1:2.32.0 | |
22 | BuildRequires: gtk-doc >= 1.14 | |
23 | BuildRequires: json-glib-devel >= 0.14.0 | |
24 | BuildRequires: libtool >= 2:2 | |
25 | BuildRequires: libuuid-devel >= 2.21.0 | |
26 | BuildRequires: libxslt-progs | |
27 | BuildRequires: pkgconfig | |
28 | BuildRequires: readline-devel | |
29 | BuildRequires: zlib-devel >= 1.2.5 | |
30 | Requires: device-mapper >= 1.0 | |
31 | Requires: glib2 >= 1:2.32.0 | |
32 | Requires: json-glib >= 0.14.0 | |
33 | Requires: libuuid >= 2.21.0 | |
34 | Requires: zlib >= 1.2.5 | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | libldm is a library for managing Microsoft Windows dynamic disks, | |
39 | which use Microsoft's LDM metadata. It can inspect them, and also | |
40 | create and remove device-mapper block devices which can be mounted. It | |
41 | includes ldmtool, which exposes this functionality as a command-line | |
42 | tool. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | libldm to biblioteka do zarządzania dyskami dynamicznymi Microsoft | |
46 | Windows, wykorzystującymi metadane Microsoft LDM. Biblioteka potrafi | |
47 | odczytywać informacje o nich, a także tworzyć i usuwać urządzenia | |
48 | blokowe device-mappera, które następnie można zamontować. Pakiet | |
49 | zawiera także program ldmtool, udostępniający funkcjonalność | |
50 | biblioteki w postaci narzędzia linii poleceń. | |
51 | ||
52 | %package devel | |
53 | Summary: Header files for libldm library | |
54 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libldm | |
55 | Group: Development/Libraries | |
56 | Requires: %{name} = %{version}-%{release} | |
57 | Requires: device-mapper-devel >= 1.0 | |
58 | Requires: glib2-devel >= 1:2.32.0 | |
59 | Requires: json-glib-devel >= 0.14.0 | |
60 | Requires: libuuid-devel >= 2.21.0 | |
61 | Requires: zlib-devel >= 1.2.5 | |
62 | ||
63 | %description devel | |
64 | Header files for libldm library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe biblioteki libldm. | |
68 | ||
69 | %package static | |
70 | Summary: Static libldm library | |
71 | Summary(pl.UTF-8): Statyczna biblioteka libldm | |
72 | Group: Development/Libraries | |
73 | Requires: %{name}-devel = %{version}-%{release} | |
74 | ||
75 | %description static | |
76 | Static libldm library. | |
77 | ||
78 | %description static -l pl.UTF-8 | |
79 | Statyczna biblioteka libldm. | |
80 | ||
81 | %package apidocs | |
82 | Summary: libldm API documentation | |
83 | Summary(pl.UTF-8): Dokumentacja API biblioteki libldm | |
84 | Group: Documentation | |
85 | Requires: gtk-doc-common | |
86 | ||
87 | %description apidocs | |
88 | API documentation for libldm library. | |
89 | ||
90 | %description apidocs -l pl.UTF-8 | |
91 | Dokumentacja API biblioteki libldm. | |
92 | ||
93 | %prep | |
94 | %setup -q | |
95 | %patch0 -p1 | |
bf93322a | 96 | %patch1 -p1 |
f7475230 JB |
97 | |
98 | %build | |
99 | %{__libtoolize} | |
100 | %{__aclocal} -I m4 | |
101 | %{__autoconf} | |
102 | %{__autoheader} | |
103 | %{__automake} | |
104 | %configure \ | |
105 | %{?with_apidocs:--enable-gtk-doc} \ | |
106 | --disable-silent-rules \ | |
107 | %{!?with_static_libs:--disable-static} \ | |
108 | --with-html-dir=%{_gtkdocdir} | |
109 | %{__make} | |
110 | ||
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %{__make} install \ | |
115 | DESTDIR=$RPM_BUILD_ROOT | |
116 | ||
117 | # obsoleted by pkg-config | |
118 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libldm-1.0.la | |
119 | ||
120 | %clean | |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %post -p /sbin/ldconfig | |
124 | %postun -p /sbin/ldconfig | |
125 | ||
126 | %files | |
127 | %defattr(644,root,root,755) | |
128 | %attr(755,root,root) %{_bindir}/ldmtool | |
129 | %attr(755,root,root) %{_libdir}/libldm-1.0.so.*.*.* | |
130 | %attr(755,root,root) %ghost %{_libdir}/libldm-1.0.so.0 | |
131 | %{_mandir}/man1/ldmtool.1* | |
132 | ||
133 | %files devel | |
134 | %defattr(644,root,root,755) | |
135 | %attr(755,root,root) %{_libdir}/libldm-1.0.so | |
136 | %{_includedir}/ldm.h | |
137 | %{_pkgconfigdir}/ldm-1.0.pc | |
138 | ||
139 | %if %{with static_libs} | |
140 | %files static | |
141 | %defattr(644,root,root,755) | |
142 | %{_libdir}/libldm-1.0.a | |
143 | %endif | |
144 | ||
145 | %if %{with apidocs} | |
146 | %files apidocs | |
147 | %defattr(644,root,root,755) | |
148 | %{_gtkdocdir}/libldm | |
149 | %endif |