%define _rel 1
Release: %{_rel}
Epoch: 0
-License: BSD/GPL
+License: BSD (library), GPL (Linux kernel module)
Group: Base/Kernel
Source0: http://www.dazuko.org/files/dazuko-%{version}.tar.gz
# Source0-md5: 844498651d22ddd76bea4104bf7c3e43
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
Requires(post,postun): /sbin/depmod
-%if %{with dist_kernel}
+%if %{with kernel} && %{with dist_kernel}
%requires_releq_kernel_up
Requires(postun): %releq_kernel_up
%endif
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
Requires(post,postun): /sbin/depmod
-%if %{with dist_kernel}
+%if %{with kernel} && %{with dist_kernel}
%requires_releq_kernel_smp
Requires(postun): %releq_kernel_smp
%endif
%package examples
Summary: Example code for Dazuko
Summary(pl): Przyk³adowy kod dla Dazuko
+License: BSD
Group: Development/Libraries
%description examples
%package devel
Summary: Headers for Dazuko
Summary(pl): Pliki nag³ówkowe Dazuko
+License: BSD
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%package static
Summary: Static libraries for Dazuko
Summary(pl): Statyczne biblioteki Dazuko
+License: BSD
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%setup -q
%build
-
-%if %{with kernel}
# NOTE: It's not autoconf configure.
bash ./configure \
--kernelsrcdir=%{_kernelsrcdir} \
- --disable-local-dpath
+ --disable-local-dpath \
+ %{!?with_userspace:--without-library} \
+ %{!?with_kernel:--without-module}
-# kernel module(s)
+%if %{with kernel}
for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
exit 1
%if %{with userspace}
cd library
%{__make} \
- CFLAGS="-fPIC"
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} -fPIC"
%{__cc} -shared -Wl,-soname,libdazuko.so.0 -o libdazuko.so.0.0.0 *.o
ln -s libdazuko.so.0.0.0 libdazuko.so.0
ln -s libdazuko.so.0.0.0 libdazuko.so
cp -a example* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -af library/libdazuko.* $RPM_BUILD_ROOT/%{_libdir}
-install dazukoio.h $RPM_BUILD_ROOT/%{_includedir}
+cp -af library/libdazuko.* $RPM_BUILD_ROOT%{_libdir}
+install dazukoio.h $RPM_BUILD_ROOT%{_includedir}
%endif
%if %{with kernel}