]> git.pld-linux.org Git - packages/em8300.git/commitdiff
This commit was manufactured by cvs2git to create branch 'AC-branch'.
authorcvs2git <feedback@pld-linux.org>
Fri, 16 Mar 2007 18:26:41 +0000 (18:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Cherrypick from master 2007-01-23 22:16:59 UTC hawk <hawk@pld-linux.org> '- release 3':
    em8300.spec -> 1.49
Cherrypick from master 2007-03-16 18:26:41 UTC Elan Ruusamäe <glen@pld-linux.org> '- use functions':
    em8300.init -> 1.9

em8300.init [new file with mode: 0644]
em8300.spec [new file with mode: 0644]

diff --git a/em8300.init b/em8300.init
new file mode 100644 (file)
index 0000000..3235dbc
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# chkconfig:   2345 11 89
+# description: loads em8300 modules and uploads microcode
+
+if [ ! -f /etc/sysconfig/em8300 ]; then
+       exit 0
+fi
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+. /etc/sysconfig/em8300
+
+start() {
+       is_yes "$BT_LOAD" && _modprobe single bt865 $BT_OPT
+       _modprobe single adv717x $ADV_OPT
+       _modprobe single em8300 $EM_OPT
+       run_cmd "Uploading em8300 microcode" "sh -c 'em8300setup 2>/dev/null'"
+       [ $? -ne 0 ] && RETVAL=1
+}
+
+stop() {
+       run_cmd "Removing em8300 modules" "sh -c 'rmmod em8300 adv717x bt865 2>/dev/null'"
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start|reload|force-reload)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  status)
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/em8300.spec b/em8300.spec
new file mode 100644 (file)
index 0000000..8848cd0
--- /dev/null
@@ -0,0 +1,268 @@
+# TODO
+# - cc
+#
+# 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 tools
+%bcond_with    verbose         # verbose build (V=1)
+%bcond_with    grsec_kernel    # build for kernel-grsecurity
+#
+%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
+%define        alt_kernel      grsecurity
+%endif
+#
+%ifarch sparc
+# kernel modules won't build on sparc32, no I2C in kernel
+%undefine      with_kernel
+%endif
+
+%if !%{with kernel}
+%undefine      with_dist_kernel
+%endif
+
+Summary:       DXR3 and H+ driver
+Summary(pl):   Sterowniki dla DXR3 i H+
+Name:          em8300
+Version:       0.16.0
+Release:       3
+License:       GPL
+Group:         Applications/System
+Source0:       http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
+# Source0-md5: 9e9b769b99927079b4fd6ec423d95049
+Source1:       %{name}.init
+Source2:       %{name}.sysconf
+Patch0:                %{name}-make.patch
+URL:           http://dxr3.sourceforge.net/
+%if %{with userspace}
+BuildRequires: autoconf >= 2.13
+BuildRequires: automake
+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.308
+%endif
+Requires(post,preun):  /sbin/chkconfig
+Provides:      dxr3
+Obsoletes:     em8300-libs
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+em8300 is a Linux driver for Creative DXR3 and Sigma Designs
+Hollywood+ cards. Both cards are hardware MPEG1, MPEG2, AC3 decoders.
+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
+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±.
+
+%package devel
+Summary:       Header file to communicate with em8300 Linux kernel modules
+Summary(pl):   Plik nag³ówkowy do komunikacji z modu³ami j±dra Linuksa em8300
+Group:         Development/Libraries
+Obsoletes:     em8300-static
+
+%description devel
+Header file to communicate with em8300 Linux kernel modules.
+
+%description devel -l pl
+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:         X11/Applications
+Requires:      %{name} = %{version}-%{release}
+
+%description gtk
+Utility programs for em8300 using GTK+ toolkit.
+
+%description gtk -l pl
+Programy u¿ytkowe em8300 u¿ywaj±ce biblioteki GTK+.
+
+%package -n kernel%{_alt_kernel}-video-em8300
+Summary:       em8300 Linux kernel modules
+Summary(pl):   Modu³y j±dra Linuksa em8300
+Group:         Base/Kernel
+Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_up
+Requires(postun):      %releq_kernel_up
+%endif
+
+%description -n kernel%{_alt_kernel}-video-em8300
+em8300 Linux kernel modules.
+
+%description -n kernel%{_alt_kernel}-video-em8300 -l pl
+Modu³y j±dra Linuksa em8300.
+
+%package -n kernel%{_alt_kernel}-smp-video-em8300
+Summary:       em8300 Linux SMP kernel modules
+Summary(pl):   Modu³y j±dra Linuksa SMP em8300
+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%{_alt_kernel}-smp-video-em8300
+em8300 Linux SMP kernel modules.
+
+%description -n kernel%{_alt_kernel}-smp-video-em8300 -l pl
+Modu³y j±dra Linuksa SMP em8300.
+
+%prep
+%setup -q
+%patch0 -p0
+
+%build
+%if %{with userspace}
+%{__aclocal} -I autotools
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+%endif
+
+%if %{with kernel}
+cd modules
+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
+%endif
+       install -d o/include/config
+       touch o/include/config/MARKER
+       ln -sf %{_kernelsrcdir}/scripts o/scripts
+
+       cp ../include/linux/em8300.h o/include/linux/em8300.h
+
+       %{__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}
+
+       for i in em8300 adv717x bt865; do
+               mv $i{,-$cfg}.ko
+       done
+done
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with userspace}
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+%endif
+
+%if %{with kernel}
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/video
+for i in adv717x bt865 em8300; do
+       install modules/$i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+               $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/video/$i.ko
+done
+%if %{with smp} && %{with dist_kernel}
+for i in adv717x bt865 em8300; do
+       install modules/$i-smp.ko \
+               $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/$i.ko
+done
+%endif
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+if [ -f /var/lock/subsys/%{name} ]; then
+       /etc/rc.d/init.d/%{name} restart 1>&2
+else
+       echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/%{name} ]; then
+               /etc/rc.d/init.d/%{name} stop 1>&2
+       fi
+       /sbin/chkconfig --del %{name}
+fi
+
+%post  -n kernel%{_alt_kernel}-video-em8300
+%depmod %{_kernel_ver}
+
+%postun        -n kernel%{_alt_kernel}-video-em8300
+%depmod %{_kernel_ver}
+
+%post  -n kernel%{_alt_kernel}-smp-video-em8300
+%depmod %{_kernel_ver}smp
+
+%postun        -n kernel%{_alt_kernel}-smp-video-em8300
+%depmod %{_kernel_ver}smp
+
+%if %{with userspace}
+%files
+%defattr(644,root,root,755)
+%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/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+# subpackage? (is it usable without alsa?)
+%{_datadir}/alsa/cards/EM8300.conf
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/linux/em8300.h
+
+%files gtk
+%defattr(644,root,root,755)
+%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*
+
+%if %{with dist_kernel} && %{with smp}
+%files -n kernel%{_alt_kernel}-smp-video-em8300
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}smp/kernel/drivers/video/*.ko*
+%endif
+%endif
This page took 0.879479 seconds and 4 git commands to generate.