forked from pld-linux/libdsk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libdsk.spec
148 lines (125 loc) · 3.81 KB
/
libdsk.spec
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
148
#
# Conditional build:
%bcond_without static_libs # static library
%bcond_without java # Java binding
#
Summary: libdsk library
Summary(pl.UTF-8): Biblioteka libdsk
Name: libdsk
Version: 1.3.8
Release: 1
License: LGPL v2+
Group: Libraries
Source0: http://www.seasip.info/Unix/LibDsk/%{name}-%{version}.tar.gz
# Source0-md5: b702926c139fb3453b683f77821884bc
Patch0: %{name}-am.patch
Patch1: %{name}-java.patch
URL: http://www.seasip.info/Unix/LibDsk/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bzip2-devel
%{?with_java:BuildRequires: jdk}
BuildRequires: libtool >= 2:2
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
LibDsk is a library intended to give transparent access to floppy
drives and to the "disc image files" used by emulators to represent
floppy drives.
%description -l pl.UTF-8
LibDsk jest biblioteką, która w sposób przezroczysty daje dostęp do
"obrazów dysków" używanych przez emulatory do reprezentowania dysków
elastycznych.
%package devel
Summary: libdsk library - development files
Summary(pl.UTF-8): Pliki programistyczne biblioteki libdsk
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: bzip2-devel
Requires: zlib-devel
%description devel
The libdsk-devel package contains the header files and documentation
needed to develop applications with libdsk.
%description devel -l pl.UTF-8
Pakiet libdsk-devel zawiera pliki nagłówkowe i dokumentację potrzebne
do kompilowania aplikacji korzystających z libdsk.
%package static
Summary: libdsk static library
Summary(pl.UTF-8): Statyczna biblioteka libdsk
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
This package contains the static libdsk library.
%description static -l pl.UTF-8
Statyczna wersja biblioteki libdsk.
%package -n java-libdsk
Summary: Java interface to libdsk library
Summary(pl.UTF-8): Interfejs Javy do biblioteki libdsk
Group: Libraries/Java
Requires: %{name} = %{version}-%{release}
Requires: jre
%description -n java-libdsk
Java interface to libdsk library.
%description -n java-libdsk -l pl.UTF-8
Interfejs Javy do biblioteki libdsk.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%{__perl} -pi -e 's,/usr/local/share,%{_datadir},' man/libdskrc.5
%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
# - ac_cv_prog_uudecode_base64=no is a workaround to enforce
# Test.class recompilation (included version doesn't work with JDK 1.6);
# - check needs . in CLASSPATH
# - we redefine --datadir because global config file is %{_datadir}/LibDsk/libdskrc
export CLASSPATH=.
%configure \
ac_cv_prog_uudecode_base64=no \
--datadir=%{_sysconfdir} \
%{!?with_static_libs:--disable-static} \
%{?with_java:--with-jni}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install -D doc/libdskrc.sample $RPM_BUILD_ROOT%{_sysconfdir}/LibDsk/libdskrc
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc ChangeLog TODO
%attr(755,root,root) %{_bindir}/apriboot
%attr(755,root,root) %{_bindir}/dsk*
%attr(755,root,root) %{_bindir}/md3serial
%attr(755,root,root) %{_libdir}/libdsk.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdsk.so.3
%dir %{_sysconfdir}/LibDsk
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/LibDsk/libdskrc
%{_mandir}/man1/apriboot.1*
%{_mandir}/man1/dsk*.1*
%{_mandir}/man1/md3serial.1*
%{_mandir}/man5/libdskrc.5*
%files devel
%defattr(644,root,root,755)
%doc doc/{libdsk.txt,cfi.html,TODO}
%attr(755,root,root) %{_libdir}/libdsk.so
%{_libdir}/libdsk.la
%{_includedir}/libdsk.h
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libdsk.a
%endif
%if %{with java}
%files -n java-libdsk
%defattr(644,root,root,755)
%{_javadir}/libdsk.jar
%endif