]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | %bcond_without java # Java binding | |
5 | # | |
6 | Summary: libdsk library | |
7 | Summary(pl.UTF-8): Biblioteka libdsk | |
8 | Name: libdsk | |
9 | Version: 1.3.5 | |
10 | Release: 1 | |
11 | License: LGPL v2+ | |
12 | Group: Libraries | |
13 | Source0: http://www.seasip.info/Unix/LibDsk/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: f1341493f83e4702d24a19b0819a3ee8 | |
15 | Patch0: %{name}-am.patch | |
16 | Patch1: %{name}-java.patch | |
17 | URL: http://www.seasip.info/Unix/LibDsk/ | |
18 | BuildRequires: autoconf | |
19 | BuildRequires: automake | |
20 | BuildRequires: bzip2-devel | |
21 | %{?with_java:BuildRequires: jdk} | |
22 | BuildRequires: libtool >= 2:2 | |
23 | BuildRequires: zlib-devel | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | LibDsk is a library intended to give transparent access to floppy | |
28 | drives and to the "disc image files" used by emulators to represent | |
29 | floppy drives. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | LibDsk jest biblioteką, która w sposób przezroczysty daje dostęp do | |
33 | "obrazów dysków" używanych przez emulatory do reprezentowania dysków | |
34 | elastycznych. | |
35 | ||
36 | %package devel | |
37 | Summary: libdsk library - development files | |
38 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libdsk | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: bzip2-devel | |
42 | Requires: zlib-devel | |
43 | ||
44 | %description devel | |
45 | The libdsk-devel package contains the header files and documentation | |
46 | needed to develop applications with libdsk. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pakiet libdsk-devel zawiera pliki nagłówkowe i dokumentację potrzebne | |
50 | do kompilowania aplikacji korzystających z libdsk. | |
51 | ||
52 | %package static | |
53 | Summary: libdsk static library | |
54 | Summary(pl.UTF-8): Statyczna biblioteka libdsk | |
55 | Group: Development/Libraries | |
56 | Requires: %{name}-devel = %{version}-%{release} | |
57 | ||
58 | %description static | |
59 | This package contains the static libdsk library. | |
60 | ||
61 | %description static -l pl.UTF-8 | |
62 | Statyczna wersja biblioteki libdsk. | |
63 | ||
64 | %package -n java-libdsk | |
65 | Summary: Java interface to libdsk library | |
66 | Summary(pl.UTF-8): Interfejs Javy do biblioteki libdsk | |
67 | Group: Libraries/Java | |
68 | Requires: %{name} = %{version}-%{release} | |
69 | Requires: jre | |
70 | ||
71 | %description -n java-libdsk | |
72 | Java interface to libdsk library. | |
73 | ||
74 | %description -n java-libdsk -l pl.UTF-8 | |
75 | Interfejs Javy do biblioteki libdsk. | |
76 | ||
77 | %prep | |
78 | %setup -q | |
79 | %patch0 -p1 | |
80 | %patch1 -p1 | |
81 | ||
82 | %{__perl} -pi -e 's,/usr/local/share,%{_datadir},' man/libdskrc.5 | |
83 | ||
84 | %build | |
85 | %{__libtoolize} | |
86 | %{__aclocal} | |
87 | %{__autoconf} | |
88 | %{__autoheader} | |
89 | %{__automake} | |
90 | # - ac_cv_prog_uudecode_base64=no is a workaround to enforce | |
91 | # Test.class recompilation (included version doesn't work with JDK 1.6); | |
92 | # - check needs . in CLASSPATH | |
93 | # - we redefine --datadir because global config file is %{_datadir}/LibDsk/libdskrc | |
94 | export CLASSPATH=. | |
95 | %configure \ | |
96 | ac_cv_prog_uudecode_base64=no \ | |
97 | --datadir=%{_sysconfdir} \ | |
98 | %{!?with_static_libs:--disable-static} \ | |
99 | %{?with_java:--with-jni} | |
100 | %{__make} | |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %{__make} install \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
107 | ||
108 | install -D doc/libdskrc.sample $RPM_BUILD_ROOT%{_sysconfdir}/LibDsk/libdskrc | |
109 | ||
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %post -p /sbin/ldconfig | |
114 | %postun -p /sbin/ldconfig | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc ChangeLog TODO | |
119 | %attr(755,root,root) %{_bindir}/apriboot | |
120 | %attr(755,root,root) %{_bindir}/dsk* | |
121 | %attr(755,root,root) %{_bindir}/md3serial | |
122 | %attr(755,root,root) %{_libdir}/libdsk.so.*.*.* | |
123 | %attr(755,root,root) %ghost %{_libdir}/libdsk.so.3 | |
124 | %dir %{_sysconfdir}/LibDsk | |
125 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/LibDsk/libdskrc | |
126 | %{_mandir}/man1/apriboot.1* | |
127 | %{_mandir}/man1/dsk*.1* | |
128 | %{_mandir}/man1/md3serial.1* | |
129 | %{_mandir}/man5/libdskrc.5* | |
130 | ||
131 | %files devel | |
132 | %defattr(644,root,root,755) | |
133 | %doc doc/{libdsk.txt,cfi.html,TODO} | |
134 | %attr(755,root,root) %{_libdir}/libdsk.so | |
135 | %{_libdir}/libdsk.la | |
136 | %{_includedir}/libdsk.h | |
137 | ||
138 | %if %{with static_libs} | |
139 | %files static | |
140 | %defattr(644,root,root,755) | |
141 | %{_libdir}/libdsk.a | |
142 | %endif | |
143 | ||
144 | %if %{with java} | |
145 | %files -n java-libdsk | |
146 | %defattr(644,root,root,755) | |
147 | %{_javadir}/libdsk.jar | |
148 | %endif |