Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
cdemu
> cdemu.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File cdemu.spec of Package cdemu
# norootforbuild Name: cdemu BuildRequires: kernel-source kernel-syms python >= 2.4 texinfo ghostscript-library module-init-tools %if 0%{?suse_version} >= 1030 BuildRequires: texlive %else BuildRequires: tetex %endif Requires: python >= 2.4 Summary: A kernel module which allows mounting different CD images such as .cue/.bin, .nrg or .ccd. Version: 0.8 Release: 15 Group: Hardware/Other License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-build URL: http://cdemu.sf.net/ Source: http://prdownloads.sourceforge.net/cdemu/%{name}-%{version}.tar.bz2 ExclusiveArch: %ix86 x86_64 %suse_kernel_module_package -n %name kdump um %description A kernel module which allows mounting different CD images such as .cue/.bin, .nrg or .ccd. This package contains only userspace tools needed for mounting the images. Please install the cdemu-kmp package suitable for your kernel. %package KMP Group: System/Kernel License: GPL Summary: The cdemu kernel module. %description KMP This package contains the cdemu kernel module. %prep %setup -q %build cd .. mkdir -p obj for flavor in %flavors_to_build; do rm -rf obj/$flavor cp -r cdemu-0.8 obj/$flavor # an ugly workaround because the makefiles tries to include other makefiles from its directory, # but during the build process it gets processed from somewhere else -- anyone knows a better way? export MKINCLUDEDIR=$PWD/obj/$flavor sed -i "s/PWD/MKINCLUDEDIR/g" $MKINCLUDEDIR/Makefile make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules %{?jobs:-j%{jobs}} M=$PWD/obj/$flavor done # build docs cd cdemu-0.8 make %{?jobs:-j%{jobs}} docs # there's no texi2pdf so we'll use dvipdf to get the pdf file. # yes I'm patching the makefile again in an ugly way ;) sed -i 's/cd\ docs;\ texi2pdf\ -c\ -q\ cdemu\.texi/dvipdf\ docs\/cdemu\.dvi\ docs\/cdemu\.pdf/g' Makefile make %{?jobs:-j%{jobs}} extra-docs %install mkdir -p $RPM_BUILD_ROOT/%{_bindir} export PYTHON_DIR=%{py_sitedir} mkdir -p $RPM_BUILD_ROOT/$PYTHON_DIR mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT/%{_infodir} %{__install} -D -m 755 cdemu $RPM_BUILD_ROOT/%{_bindir}/cdemu %{__install} -D -m 644 libcdemu.py $RPM_BUILD_ROOT/$PYTHON_DIR/libcdemu.py gzip docs/cdemu.1 gzip docs/cdemu.info %{__install} -D -m 644 docs/cdemu.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/cdemu.1.gz %{__install} -D -m 644 docs/cdemu.info.gz $RPM_BUILD_ROOT/%{_infodir}/cdemu.info.gz export INSTALL_MOD_PATH=$RPM_BUILD_ROOT export INSTALL_MOD_DIR=updates cd ../obj for flavor in %flavors_to_build; do cd $flavor make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules_install M=$PWD cd .. done %clean rm -rf $RPM_BUILD_ROOT %post KMP # add an udev rule and run depmod -aq echo 'KERNEL="cdemu[0-9]*", NAME="cdemu/%n", MODE="0666"' >> /etc/udev/rules.d/55-cdrom.rules /sbin/depmod -aq %postun KMP # remove the udev rule # should we search only cdrom.rules or all udev rules? # this might NOT work! sed -i "s/`grep cdemu /etc/udev/rules.d/55-cdrom.rules`//g" /etc/udev/rules.d/55-cdrom.rules #but perhaps this one instead? but what shall we do if the user changed the entry? #sed -i "s/'KERNEL="cdemu[0-9]*", NAME="cdemu/%n", MODE="0666"'//g" /etc/udev/rules.d/55-cdrom.rules %files %defattr(-,root,root) %{_bindir}/cdemu %{py_sitedir}/libcdemu.py %{_mandir}/man1/cdemu.1.gz %{_infodir}/cdemu.info.gz %doc README TODO AUTHORS docs/cdemu.dvi docs/cdemu.pdf %changelog * Sat Jul 19 2008 Carsten Schoene <cs@linux-administrator.com> - initial package import