]> git.pld-linux.org Git - packages/dazuko.git/blobdiff - dazuko.spec
- converted to UTF-8
[packages/dazuko.git] / dazuko.spec
index 0efed6dc07f7a42f0226af79eaf3da41638d1e46..8b54eab7dfc521e3e0faed2129b0f722f5939c6f 100644 (file)
@@ -1,9 +1,4 @@
 #
 #
-# Replace dazuko with real module name and misc
-# with required directory name.
-#
-# TODO: fix Name vs filename
-#
 # Conditional build:
 %bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_without kernel          # don't build kernel modules
 # Conditional build:
 %bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_without kernel          # don't build kernel modules
 %bcond_without userspace       # don't build userspace module
 %bcond_with    verbose         # verbose build (V=1)
 #
 %bcond_without userspace       # don't build userspace module
 %bcond_with    verbose         # verbose build (V=1)
 #
-# main package.
+%if !%{with kernel}
+%undefine      with_dist_kernel
+%endif
 #
 #
+%define                _rel    1
 Summary:       Linux Dazuko driver
 Summary:       Linux Dazuko driver
-Summary(pl):   Sterownik Dazuko dla Linuksa
+Summary(pl.UTF-8):   Sterownik Dazuko dla Linuksa
 Name:          dazuko
 Name:          dazuko
-Version:       2.0.4
-%define                _rel    0.3
+Version:       2.3.2
 Release:       %{_rel}
 Epoch:         0
 Release:       %{_rel}
 Epoch:         0
-License:       BSD/GPL
+License:       BSD (library), GPL (Linux kernel module)
 Group:         Base/Kernel
 Group:         Base/Kernel
-Source0:       http://www.dazuko.org/files/dazuko-%{version}.tar.gz
-# Source0-md5: e16da48766eaaf58550809fb0f6dbbef
+Source0:       http://www.dazuko.org/files/%{name}-%{version}.tar.gz
+# Source0-md5: bb32e24ad60a31dbfc419d3341287f68
+Patch0:                %{name}-kbuild.patch
+Patch1:                %{name}-caps.patch
 URL:           http://www.dazuko.org/
 %if %{with kernel}
 URL:           http://www.dazuko.org/
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.7}
-BuildRequires: rpmbuild(macros) >= 1.153
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.14}
+BuildRequires: rpmbuild(macros) >= 1.286
 %endif
 %endif
-BuildRequires: bash
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,27 +36,27 @@ applications to control file access on a system. By installing the
 driver, your system will be able to support file access control
 applications that are based on Dazuko. As this project becomes more
 popular and more applications choose Dazuko for their file access
 driver, your system will be able to support file access control
 applications that are based on Dazuko. As this project becomes more
 popular and more applications choose Dazuko for their file access
-needs, it is hoped that this driver will become a common component
-of most systems. 
+needs, it is hoped that this driver will become a common component of
+most systems.
 
 To install the dazuko kernel module install kernel-misc-dazuko or
 kernel-smp-misc-dazuko.
 
 
 To install the dazuko kernel module install kernel-misc-dazuko or
 kernel-smp-misc-dazuko.
 
-%description -l pl
-Dazuko ma byæ wieloplatformowym sterownikiem urz±dzenia pozwalaj±cym
-aplikacjom sterowaæ dostêpem do plików w systemie. Poprzez
-zainstalowanie sterownika system bêdzie móg³ wspieraæ aplikacje
-steruj±ce dostêpem do plików w oparciu o Dazuko. Kiedy ten projekt
-stanie siê popularny, autorzy maj± nadziejê, ¿e sterownik ten bêdzie
-popularnym elementem wiêkszo¶ci systemów.
+%description -l pl.UTF-8
+Dazuko ma być wieloplatformowym sterownikiem urządzenia pozwalającym
+aplikacjom sterować dostępem do plików w systemie. Poprzez
+zainstalowanie sterownika system będzie mógł wspierać aplikacje
+sterujące dostępem do plików w oparciu o Dazuko. Kiedy ten projekt
+stanie się popularny, autorzy mają nadzieję, że sterownik ten będzie
+popularnym elementem większości systemów.
 
 
-Aby zainstalowaæ modu³ j±dra nale¿y zainstalowaæ pakiet
+Aby zainstalować moduł jądra należy zainstalować pakiet
 kernel-misc-dazuko lub kernel-smp-misc-dazuko.
 
 # kernel subpackages.
 kernel-misc-dazuko lub kernel-smp-misc-dazuko.
 
 # kernel subpackages.
-%package -n kernel-misc-%{name}
+%package -n kernel%{_alt_kernel}-misc-%{name}
 Summary:       Linux driver for dazuko
 Summary:       Linux driver for dazuko
-Summary(pl):   Linuksowy sterownik dazuko
+Summary(pl.UTF-8):   Linuksowy sterownik dazuko
 Release:       %{_rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
 Release:       %{_rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
@@ -67,17 +65,17 @@ Requires(post,postun):      /sbin/depmod
 Requires(postun):      %releq_kernel_up
 %endif
 
 Requires(postun):      %releq_kernel_up
 %endif
 
-%description -n kernel-misc-%{name}
+%description -n kernel%{_alt_kernel}-misc-%{name}
 This is driver for dazuko for Linux.
 
 This package contains Linux module.
 
 This is driver for dazuko for Linux.
 
 This package contains Linux module.
 
-%description -n kernel-misc-%{name} -l pl
+%description -n kernel%{_alt_kernel}-misc-%{name} -l pl.UTF-8
 Ten pakiet zawiera sterownik dazuko dla Linuksa.
 
 Ten pakiet zawiera sterownik dazuko dla Linuksa.
 
-%package -n kernel-smp-misc-%{name}
+%package -n kernel%{_alt_kernel}-smp-misc-%{name}
 Summary:       Linux SMP driver for dazuko
 Summary:       Linux SMP driver for dazuko
-Summary(pl):   Sterownik dazuko dla Linuksa SMP
+Summary(pl.UTF-8):   Sterownik dazuko dla Linuksa SMP
 Release:       %{_rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
 Release:       %{_rel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
@@ -86,58 +84,128 @@ Requires(post,postun):     /sbin/depmod
 Requires(postun):      %releq_kernel_smp
 %endif
 
 Requires(postun):      %releq_kernel_smp
 %endif
 
-%description -n kernel-smp-misc-%{name}
+%description -n kernel%{_alt_kernel}-smp-misc-%{name}
 This is driver for dazuko for Linux.
 
 This package contains Linux SMP module.
 
 This is driver for dazuko for Linux.
 
 This package contains Linux SMP module.
 
-%description -n kernel-smp-misc-%{name} -l pl
+%description -n kernel%{_alt_kernel}-smp-misc-%{name} -l pl.UTF-8
 Ten pakiet zawiera sterownik dazuko dla Linuksa SMP.
 
 Ten pakiet zawiera sterownik dazuko dla Linuksa SMP.
 
+%package examples
+Summary:       Example code for Dazuko
+Summary(pl.UTF-8):   Przykładowy kod dla Dazuko
+License:       BSD
+Group:         Development/Libraries
+
+%description examples
+Example code for Dazuko.
+
+%description examples -l pl.UTF-8
+Przykładowy kod dla Dazuko.
+
+%package devel
+Summary:       Headers for Dazuko
+Summary(pl.UTF-8):   Pliki nagłówkowe Dazuko
+License:       BSD
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Headers for Dazuko.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe Dazuko.
+
+%package static
+Summary:       Static libraries for Dazuko
+Summary(pl.UTF-8):   Statyczne biblioteki Dazuko
+License:       BSD
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static libraries for Dazuko.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki Dazuko.
+
 %prep
 %setup -q
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 
 %build
-
 %if %{with kernel}
 %if %{with kernel}
-# NOTE: It's not autoconf configure.
-bash ./configure \
-       --kernelsrcdir=%{_kernelsrcdir}
-
-# kernel module(s)
 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
        if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
                exit 1
        fi
 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
        if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
                exit 1
        fi
-       rm -rf include
-       install -d include/{linux,config}
-       ln -sf %{_kernelsrcdir}/config-$cfg .config
-       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
-       ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-       touch include/config/MARKER
+       install -d o/include/linux
+       ln -sf %{_kernelsrcdir}/config-$cfg o/.config
+       ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
+       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
+%if %{with dist_kernel}
+       %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
+%else
+       install -d o/include/config
+       touch o/include/config/MARKER
+       ln -sf %{_kernelsrcdir}/scripts o/scripts
+%endif
 #
 #      patching/creating makefile(s) (optional)
 #
 #      patching/creating makefile(s) (optional)
-#
+
+       # NOTE: It's not autoconf configure.
+       ./configure \
+               --kernelsrcdir=%{_kernelsrcdir} \
+               %{?debug:--enable-debug} \
+               --disable-compat1 \
+               --without-library
+
        %{__make} -C %{_kernelsrcdir} clean \
                RCS_FIND_IGNORE="-name '*.ko' -o" \
        %{__make} -C %{_kernelsrcdir} clean \
                RCS_FIND_IGNORE="-name '*.ko' -o" \
-               M=$PWD O=$PWD \
+               SYSSRC=%{_kernelsrcdir} \
+               SYSOUT=$PWD/o \
+               M=$PWD O=$PWD/o \
                %{?with_verbose:V=1}
        %{__make} -C %{_kernelsrcdir} modules \
                CC="%{__cc}" CPP="%{__cpp}" \
                %{?with_verbose:V=1}
        %{__make} -C %{_kernelsrcdir} modules \
                CC="%{__cc}" CPP="%{__cpp}" \
-               M=$PWD O=$PWD \
+               SYSSRC=%{_kernelsrcdir} \
+               SYSOUT=$PWD/o \
+               M=$PWD O=$PWD/o \
                %{?with_verbose:V=1}
 
        mv dazuko{,-$cfg}.ko
 done
 %endif
 
                %{?with_verbose:V=1}
 
        mv dazuko{,-$cfg}.ko
 done
 %endif
 
+%if %{with userspace}
+# NOTE: It's not autoconf configure.
+./configure \
+       %{?debug:--enable-debug} \
+       --disable-compat1 \
+       --without-module
+
+cd library
+%{__make} \
+       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
+cd ..
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with userspace}
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with userspace}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT{%{_examplesdir}/%{name}-%{version},%{_libdir},%{_includedir}}
 
 cp -a example* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 cp -a example* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+cp -af library/libdazuko.* $RPM_BUILD_ROOT%{_libdir}
+install dazukoio.h $RPM_BUILD_ROOT%{_includedir}
 %endif
 
 %if %{with kernel}
 %endif
 
 %if %{with kernel}
@@ -153,25 +221,28 @@ install dazuko-smp.ko \
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -n kernel-misc-dazuko
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%post  -n kernel%{_alt_kernel}-misc-dazuko
 %depmod %{_kernel_ver}
 
 %depmod %{_kernel_ver}
 
-%postun        -n kernel-misc-dazuko
+%postun        -n kernel%{_alt_kernel}-misc-dazuko
 %depmod %{_kernel_ver}
 
 %depmod %{_kernel_ver}
 
-%post  -n kernel-smp-misc-dazuko
+%post  -n kernel%{_alt_kernel}-smp-misc-dazuko
 %depmod %{_kernel_ver}smp
 
 %depmod %{_kernel_ver}smp
 
-%postun        -n kernel-smp-misc-dazuko
+%postun        -n kernel%{_alt_kernel}-smp-misc-dazuko
 %depmod %{_kernel_ver}smp
 
 %if %{with kernel}
 %depmod %{_kernel_ver}smp
 
 %if %{with kernel}
-%files -n kernel-misc-dazuko
+%files -n kernel%{_alt_kernel}-misc-dazuko
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/misc/*.ko*
 
 %if %{with smp} && %{with dist_kernel}
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/misc/*.ko*
 
 %if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-misc-dazuko
+%files -n kernel%{_alt_kernel}-smp-misc-dazuko
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
 %endif
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
 %endif
@@ -179,7 +250,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %{with userspace}
 %files
 
 %if %{with userspace}
 %files
-%doc README
 %defattr(644,root,root,755)
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdazuko.so.*.*.*
+
+%files examples
+%defattr(644,root,root,755)
+%doc README
 %{_examplesdir}/%{name}-%{version}
 %{_examplesdir}/%{name}-%{version}
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdazuko.so
+%{_includedir}/dazukoio.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a
 %endif
 %endif
This page took 0.103119 seconds and 4 git commands to generate.