]> git.pld-linux.org Git - packages/em8300.git/blobdiff - em8300.spec
- updated to 0.18.0 (kernel part not verified)
[packages/em8300.git] / em8300.spec
index 6c19b8944a649d878441d48555ec14c76c31aa12..ec72f83ffc718b18f2d7c2a8e3406ce516039d02 100644 (file)
@@ -1,23 +1,62 @@
-Summary:       dxr3 and h+ driver
-Summary(pl):   sterowniki dla dxr3 i h+
-Name:          em8300
-Version:       0.12.0
-Release:       0
-License:       GPL
-Group:         Base/Kernel
-Source0:       http://dxr3.sourceforge.net/download/%{name}-%{version}.tar.gz
+# TODO
+# - cc
+#
+# 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 tools
+%bcond_with    verbose         # verbose build (V=1)
+
+%ifarch sparc
+# kernel modules won't build on sparc32, no I2C in kernel
+%undefine      with_kernel
+%endif
+
+%if %{without kernel}
+%undefine      with_dist_kernel
+%endif
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine      with_userspace
+%endif
+%if %{without userspace}
+# nothing to be placed to debuginfo package
+%define                _enable_debug_packages  0
+%endif
+
+%define                pname   em8300
+%define                rel             1
+Summary:       DXR3 and H+ driver
+Summary(pl.UTF-8):     Sterowniki dla DXR3 i H+
+Name:          %{pname}%{_alt_kernel}
+Version:       0.18.0
+Release:       %{rel}
+License:       GPL v2+
+Group:         Applications/System
+Source0:       http://downloads.sourceforge.net/dxr3/%{pname}-%{version}.tar.gz
+# Source0-md5: 2ef10f5159508a31a877e7e6d18c6896
+Source1:       %{pname}.init
+Source2:       %{pname}.sysconf
+Patch0:                %{pname}-make.patch
 URL:           http://dxr3.sourceforge.net/
-BuildRequires: autoconf
+%if %{with userspace}
+BuildRequires: autoconf >= 2.50
 BuildRequires: automake
-BuildRequires: libtool
-BuildRequires: gtk+-devel
-Requires(post,postun):/sbin/ldconfig
-Requires(post,postun):/sbin/depmod
+BuildRequires: gtk+2-devel >= 1:2.0.0
+BuildRequires: pkgconfig
+%endif
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.14}
+BuildRequires: rpmbuild(macros) >= 1.379
+%endif
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 Provides:      dxr3
+Obsoletes:     em8300-libs
+%if %{without userspace}
+ExcludeArch:   sparc
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _xbindir                %{_prefix}/X11R6/bin
-
 %description
 em8300 is a Linux driver for Creative DXR3 and Sigma Designs
 Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
@@ -25,98 +64,138 @@ Additionaly Xine and MPlayer with help of this driver allow you to
 play all the video formats that they recognise through the tv-out of
 these cards.
 
-%description -l pl
+%description -l pl.UTF-8
 em8300 pozwala na uruchomienie pod Linuksem kart Creative DXR3 i Sigma
-Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji s±
-sprzêtowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
-pozwalaj± przy u¿yciu tego sterownika na odtwarzanie przez wyj¶cie
-telewizyjne tych kart nie tylko w/w formatów, ale tak¿e wszystkich
-formatów video, które te programy rozpoznaj±.
+Designs Hollywood+. Obie karty, o prawie identycznej konstrukcji są
+sprzętowymi dekoderami MPEG1, MPEG2 i AC3. Programy Xine i MPlayer
+pozwalają przy użyciu tego sterownika na odtwarzanie przez wyjście
+telewizyjne tych kart nie tylko w/w formatów, ale także wszystkich
+formatów video, które te programy rozpoznają.
 
 %package devel
-Summary:       Files required to develop programs using em8300
-Summary(pl):   Pliki potrzebne do tworzenia programów korzystaj±cych z em8300
-Group:         Base/Kernel
-Requires:      %{name} = %{version}
+Summary:       Header file to communicate with em8300 Linux kernel modules
+Summary(pl.UTF-8):     Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300
+Group:         Development/Libraries
+Obsoletes:     em8300-static
 
 %description devel
-Header files and additional scripts useful for developers of em8300
-apps.
+Header file to communicate with em8300 Linux kernel modules.
 
-%description devel -l pl
-Pliki nag³ówkowe i skrypty przydatne dla autorów aplikacji
-korzystaj±cych z em8300.
+%description devel -l pl.UTF-8
+Plik nagłówkowy do komunikacji z modułami jądra Linuksa em8300.
 
 %package gtk
-Summary:       Utility programs for em8300 using gtk+
-Summary(pl):   Programy u¿ytkowe em8300 u¿ywaj±ce bibliteki gtk+
-Group:         Base/Kernel
-Requires:      %{name} = %{version}
+Summary:       Utility programs for em8300 using GTK+
+Summary(pl.UTF-8):     Programy użytkowe em8300 używające bibliteki GTK+
+Group:         X11/Applications
+Requires:      %{pname} = %{version}-%{release}
 
 %description gtk
-Utility programs for em8300 using gtk+ toolkit.
+Utility programs for em8300 using GTK+ toolkit.
 
-%description gtk -l pl
-Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki gtk+.
+%description gtk -l pl.UTF-8
+Programy użytkowe em8300 używające biblioteki GTK+.
+
+%package -n kernel%{_alt_kernel}-video-em8300
+Summary:       em8300 Linux kernel modules
+Summary(pl.UTF-8):     Moduły jądra Linuksa em8300
+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
+%endif
+Obsoletes:     kernel%{_alt_kernel}-smp-video-em8300
+
+%description -n kernel%{_alt_kernel}-video-em8300
+em8300 Linux kernel modules.
+
+%description -n kernel%{_alt_kernel}-video-em8300 -l pl.UTF-8
+Moduły jądra Linuksa em8300.
 
 %prep
-%setup -q
+%setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
-sh bootstrap
+%if %{with userspace}
+%{__aclocal} -I autotools
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
 %{__make}
-cd modules
-make
+%endif
+
+%if %{with kernel}
+%build_kernel_modules -C modules -m em8300,adv717x,bt865 <<'EOF'
+       cp ../include/linux/em8300.h o/include/linux/em8300.h
+EOF
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-cd modules
-%{__make} install-newkern prefix=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT/lib/modules -name "*.o" -print | sed s,$RPM_BUILD_ROOT,, >../mods.lst
-mv INSTALL INSTALL.modules
+%if %{with userspace}
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT/%{_datadir}/misc
-install em8300.uc $RPM_BUILD_ROOT/%{_datadir}/misc
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
+install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{pname}
+%endif
 
-cd $RPM_BUILD_ROOT
-install -d ./%{_xbindir}
-mv ./%{_bindir}/* ./%{_xbindir}
-
-cd $RPM_BUILD_ROOT%{_datadir}
-install -m 755 em8300/microcode_upload.pl ../bin/em8300_microcode_upload
+%if %{with kernel}
+%install_kernel_modules -m modules/{em8300,adv717x,bt865} -d kernel/drivers/video
+%endif
 
 %clean
-rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}
-
-%postun
-/sbin/ldconfig
-/sbin/depmod -a
+rm -rf $RPM_BUILD_ROOT
 
 %post
-/sbin/ldconfig
-/sbin/depmod -a
+/sbin/chkconfig --add %{pname}
+%service %{pname} restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service stop
+       /sbin/chkconfig --del %{pname}
+fi
 
-%files -f mods.lst
+%post  -n kernel%{_alt_kernel}-video-em8300
+%depmod %{_kernel_ver}
+
+%postun        -n kernel%{_alt_kernel}-video-em8300
+%depmod %{_kernel_ver}
+
+%if %{with userspace}
+%files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog COPYING README
-%doc modules/README* modules/INSTALL* modules/devices.sh modules/devfs_symlinks
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_datadir}/misc/*
-%attr(755,root,root) %{_libdir}/lib*.so.*
+%doc AUTHORS ChangeLog README modules/README*
+%attr(755,root,root) %{_bindir}/em8300setup
+/lib/firmware/em8300.bin
+%dir %{_datadir}/em8300
+%{_datadir}/em8300/em8300.pm
+%attr(755,root,root) %{_datadir}/em8300/*.pl
+%{_mandir}/man1/em8300setup.1*
+%attr(754,root,root) /etc/rc.d/init.d/%{pname}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{pname}
+# subpackage? (is it usable without alsa?)
+%{_datadir}/alsa/cards/EM8300.conf
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/libdxr3
-%{_includedir}/linux/*
-%attr(755,root,root) %{_libdir}/lib*.so
-%attr(755,root,root) %{_libdir}/lib*.la
-%attr(755,root,root) %dir %{_datadir}/em8300
-%attr(755,root,root) %{_datadir}/em8300/*
+%{_includedir}/linux/em8300.h
 
 %files gtk
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_xbindir}/*
+%attr(755,root,root) %{_bindir}/autocal
+%attr(755,root,root) %{_bindir}/dhc
+%attr(755,root,root) %{_bindir}/dxr3view
+%endif
+
+%if %{with kernel}
+%files -n kernel%{_alt_kernel}-video-em8300
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/kernel/drivers/video/*.ko*
+%endif
This page took 0.142806 seconds and 4 git commands to generate.