]> git.pld-linux.org Git - packages/dazuko.git/blobdiff - dazuko.spec
- not needed, we use own build system
[packages/dazuko.git] / dazuko.spec
index e3add157218150d3776bcdc20fcaada7ebf0d35e..3d919eaef6cf0312679930be1d775aea584409eb 100644 (file)
@@ -2,31 +2,30 @@
 # Conditional build:
 %bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_without kernel          # don't build kernel modules
-%bcond_without smp             # don't build SMP module
 %bcond_without userspace       # don't build userspace module
 %bcond_with    verbose         # verbose build (V=1)
 #
-%if %{without kernel}
+%if !%{with kernel}
 %undefine      with_dist_kernel
 %endif
 #
-%define                _rel    1
+%define                _rel    0.7
 Summary:       Linux Dazuko driver
-Summary(pl):   Sterownik Dazuko dla Linuksa
+Summary(pl.UTF-8):     Sterownik Dazuko dla Linuksa
 Name:          dazuko
-Version:       2.0.6
+Version:       2.3.4
 Release:       %{_rel}
 Epoch:         0
 License:       BSD (library), GPL (Linux kernel module)
 Group:         Base/Kernel
 Source0:       http://www.dazuko.org/files/%{name}-%{version}.tar.gz
-# Source0-md5: 844498651d22ddd76bea4104bf7c3e43
+# Source0-md5: 14ae194714584944b983845793daf2a4
+Patch0:                %{name}-caps.patch
 URL:           http://www.dazuko.org/
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.7}
-BuildRequires: rpmbuild(macros) >= 1.286
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
+BuildRequires: rpmbuild(macros) >= 1.379
 %endif
-BuildRequires: bash
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,74 +37,53 @@ 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.
 
-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.
 
-%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
-kernel-misc-dazuko lub kernel-smp-misc-dazuko.
+Aby zainstalować moduł jądra należy zainstalować pakiet
+kernel-misc-dazuko.
 
-# kernel subpackages.
-%package -n kernel-misc-%{name}
+%package -n kernel%{_alt_kernel}-misc-%{name}
 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
 %if %{with dist_kernel}
-%requires_releq_kernel_up
-Requires(postun):      %releq_kernel_up
+%requires_releq_kernel
+Requires(postun):      %releq_kernel
 %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.
 
-%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.
 
-%package -n kernel-smp-misc-%{name}
-Summary:       Linux SMP driver for dazuko
-Summary(pl):   Sterownik dazuko dla Linuksa SMP
-Release:       %{_rel}@%{_kernel_ver_str}
-Group:         Base/Kernel
-Requires(post,postun): /sbin/depmod
-%if %{with dist_kernel}
-%requires_releq_kernel_smp
-Requires(postun):      %releq_kernel_smp
-%endif
-
-%description -n kernel-smp-misc-%{name}
-This is driver for dazuko for Linux.
-
-This package contains Linux SMP module.
-
-%description -n kernel-smp-misc-%{name} -l pl
-Ten pakiet zawiera sterownik dazuko dla Linuksa SMP.
-
 %package examples
 Summary:       Example code for Dazuko
-Summary(pl):   Przyk³adowy kod dla 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
-Przyk³adowy kod dla Dazuko.
+%description examples -l pl.UTF-8
+Przykładowy kod dla Dazuko.
 
 %package devel
 Summary:       Headers for Dazuko
-Summary(pl):   Pliki nag³ówkowe Dazuko
+Summary(pl.UTF-8):     Pliki nagłówkowe Dazuko
 License:       BSD
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
@@ -113,12 +91,12 @@ Requires:  %{name} = %{version}-%{release}
 %description devel
 Headers for Dazuko.
 
-%description devel -l pl
-Pliki nag³ówkowe Dazuko.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe Dazuko.
 
 %package static
 Summary:       Static libraries for Dazuko
-Summary(pl):   Statyczne biblioteki Dazuko
+Summary(pl.UTF-8):     Statyczne biblioteki Dazuko
 License:       BSD
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
@@ -126,59 +104,38 @@ Requires: %{name}-devel = %{version}-%{release}
 %description static
 Static libraries for Dazuko.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Statyczne biblioteki Dazuko.
 
 %prep
 %setup -q
+%patch0 -p1
 
-%build
-# NOTE: It's not autoconf configure.
-bash ./configure \
-       %{?debug:--enable-debug} \
-       --kernelsrcdir=%{_kernelsrcdir} \
-       --disable-local-dpath \
-       --disable-compat1 \
-       %{!?with_userspace:--without-library} \
-       %{!?with_kernel:--without-module}
+cat > Makefile << EOF
+obj-m += dazuko.o
+
+dazuko-objs := dazuko_core.o dazuko_transport.o dazuko_linux26_lsm.o dazuko_linux26.o
+
+CFLAGS += -DLINUX26_SUPPORT -DTRUSTED_APPLICATION_SUPPORT
+CFLAGS += -DUSE_CLASS -DUSE_TRYTOFREEZEVOID -DLINUX_USE_FREEZER_H
+CFLAGS += -DTASKSTRUCT_USES_PARENT -DUSE_CONFIG_H -DON_OPEN_SUPPORT -DON_EXEC_SUPPORT
+EOF
 
+%build
+./linux_dev_conf %{_kernelsrcdir}/include/linux/device.h
+./linux_lsm_conf %{_kernelsrcdir}/include/linux/security.h
 %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
-       fi
-       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)
-#
-       %{__make} -C %{_kernelsrcdir} clean \
-               RCS_FIND_IGNORE="-name '*.ko' -o" \
-               SYSSRC=%{_kernelsrcdir} \
-               SYSOUT=$PWD/o \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-       %{__make} -C %{_kernelsrcdir} modules \
-               CC="%{__cc}" CPP="%{__cpp}" \
-               SYSSRC=%{_kernelsrcdir} \
-               SYSOUT=$PWD/o \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-
-       mv dazuko{,-$cfg}.ko
-done
+%build_kernel_modules -m dazuko
 %endif
 
 %if %{with userspace}
+# NOTE: It's not autoconf configure.
+./configure \
+       %{?debug:--enable-debug} \
+       --disable-compat1 \
+       --without-module \
+       --disable-rsbac
+
 cd library
 %{__make} \
        CC="%{__cc}" \
@@ -202,13 +159,7 @@ install dazukoio.h $RPM_BUILD_ROOT%{_includedir}
 %endif
 
 %if %{with kernel}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install dazuko-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/dazuko.ko
-%if %{with smp} && %{with dist_kernel}
-install dazuko-smp.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/dazuko.ko
-%endif
+%install_kernel_modules -m dazuko -d misc
 %endif
 
 %clean
@@ -217,28 +168,16 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%post  -n kernel-misc-dazuko
+%post  -n kernel%{_alt_kernel}-misc-dazuko
 %depmod %{_kernel_ver}
 
-%postun        -n kernel-misc-dazuko
+%postun        -n kernel%{_alt_kernel}-misc-dazuko
 %depmod %{_kernel_ver}
 
-%post  -n kernel-smp-misc-dazuko
-%depmod %{_kernel_ver}smp
-
-%postun        -n kernel-smp-misc-dazuko
-%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}
-%files -n kernel-smp-misc-dazuko
-%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/misc/*.ko*
-%endif
 %endif
 
 %if %{with userspace}
This page took 0.065356 seconds and 4 git commands to generate.