LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cdrtools.spec of Package cdrtools (Project multimedia:apps)

#
# spec file for package cdrtools
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           cdrtools
Version:        3.01~a14
# ^This really is a prerelease and thus sorts before 3.01
%define sversion 3.01
Release:        0
Summary:        Tools for recording CD/DVD/BluRay media
License:        CDDL-1.0 or GPL-2.0+
Url:            http://cdrecord.berlios.de/private/cdrecord.html
Group:          Productivity/Multimedia/CD/Record

#DL-URL:	ftp://ftp.berlios.de/pub/cdrecord/
Source:         ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-3.01a14.tar.bz2
Source1:        cdrecord.easy
Source2:        cdrecord.secure
Source3:        cdrecord.paranoid
Source4:	cdda2wav.easy
Source5:	cdda2wav.secure
Source6:	cdda2wav.paranoid
Source100:      cdrtools.rpmlintrc
# Please note: Joerg Schilling (the author) does not like us applying patches to
# his sources. We will try to honor this request if possible.
# -Marcus Meissner <meissner@suse.de>
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  alsa-devel
BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  file-devel
BuildRequires:  gcc-c++
BuildRequires:  libcap-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtool
BuildRequires:  pkg-config
# Requiring version-release is nessecary for this rpm to pull in the latest cdrtools.
Requires:       cdda2wav = %{version}-%{release}
Requires:       cdrecord = %{version}-%{release}
Requires:       mkisofs = %{version}-%{release}
Provides:       schily-cdrtools = %{version}
Obsoletes:      schily-cdrtools < %{version}
Conflicts:      cdrkit-cdrtools-compat

%define with_caps 1
%if 0%{?with_caps}
%define caps_cdda2wav %caps(cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio=ep)
%define caps_cdrecord %caps(cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio=ep)
%define caps_readcd   %caps(cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio=ep)
%else
%define caps_cdda2wav %nil
%define caps_cdrecord %nil
%define caps_readcd   %nil
%endif

%description
Cdrtools is a set of command line programs for writing to
CD/DVD/BluRay media.
It will install the original cdrtools binaries.
This is the original version from Joerg Schilling.
Built from clean sources without patches.
This package replaces cdrkit-cdrtools-compat.

%package devel
Summary:        Development files for cdrtools
Group:          Development/Libraries/Other
Requires:       cdrtools = %{version}

%description devel
Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay
media.
This development package contains static libraries and header files.
Build from clean sources without patches.

%package -n btcflash
Summary:        Firmware flash utility for BTC DRW1008 DVD+/-RW recorder
Group:          Hardware/Other

%description -n btcflash
Btcflash is used to read update the Firmware for a BTC DRW1008 DVD+/-RW
recorder.
Be very careful when writing firmware as this program does not check for the
correctness of the target device.
Build from clean sources without patches.

%package -n cdda2wav
Summary:        A CD-Audio Grabbing tool
Group:          Productivity/Multimedia/CD/Grabbers
Requires(post): permissions

%description -n cdda2wav
cdda2wav can retrieve audio tracks from CDROM drives that are capable of
reading audio data digitally to the host via SCSI (CDDA).

Build from clean sources without patches.

%package -n cdrecord
Summary:        A CD/DVD/BD recording program
Group:          Productivity/Multimedia/CD/Record
Requires(post): permissions

%description -n cdrecord
Cdrecord is a program to record data or audio Compact Discs on an Orange Book
CD-recorder, to write DVD media on a DVD-recorder or to write BluRay media on a
BluRay-recorder.

Build from clean sources without patches.

%package -n mkisofs
Summary:        A program to generate an ISO-9660/JOLIET/HFS/UDF hybrid filesystem
Group:          Productivity/Multimedia/CD/Record
Requires:       zisofs-tools

%description -n mkisofs
mkisofs is effectively a pre-mastering program to generate an
ISO-9660/JOLIET/HFS/UDF hybrid filesystem.

Build from clean sources without patches.

%prep
%setup -q -n %{name}-%{sversion}

%build
#V=1 VERBOSE=1 CFLAGS="$CFLAGS -fPIE" LDFLAGS="$LDFLAGS -Wl,-pie"
gmake CCOM=gcc 'COPTX=-fPIE -ggdb -finput-charset=ISO-8859-1' \
	LDOPTX="-pie -Wl,-pie -ggdb"

%install
gmake 'INS_BASE=%{_prefix}' 'DESTDIR=%{buildroot}' install

#
mkdir -p "%{buildroot}%{_sysconfdir}/permissions.d/"
install -pm 0644 "%_sourcedir"/{cdrecord,cdda2wav}.{easy,secure,paranoid} \
	"%buildroot/%_sysconfdir/permissions.d/"

#
cd '%{buildroot}%{_prefix}'
[[ -d './%{_lib}' ]] || mv -T ./lib './%{_lib}'
cd -

# Needed by cdda2wav (see cdda2wav.c)
ln -sf cdda2wav %{buildroot}%{_bindir}/list_audio_tracks

# Remove documentation (will be added in /usr/share/doc/packages/*)
rm -rf %{buildroot}%{_datadir}/doc/*

# Install additional programs
install -pm 0755 cdda2wav/cdda2mp3.new %{buildroot}%{_bindir}/
install -pm 0755 cdda2wav/inf2cdtext.pl %{buildroot}%{_bindir}/
install -pm 0755 cdda2wav/pitchplay %{buildroot}%{_bindir}/
install -pm 0755 cdda2wav/readmult %{buildroot}%{_bindir}/
install -pm 0755 cdda2wav/tracknames.pl %{buildroot}%{_bindir}/
install -pm 0755 mkisofs/hdisk.pl %{buildroot}%{_bindir}/

# Fix perl path
perl -pi -e 's#/usr/local/bin/perl#/usr/bin/perl#g' %{buildroot}%{_bindir}/tracknames.pl

# Rename in order to not conflict with mkisofs/README in rpm doc section
mv mkisofs/diag/README mkisofs/diag/README.diag

# Temporary removal of static libraries without debinfo
rm -f %{buildroot}%{_libdir}/profiled/libedc_ecc.a
rm -f %{buildroot}%{_libdir}/libedc_ecc.a

%fdupes -s %{buildroot}%{_mandir}
%fdupes -s %{buildroot}%{_sysconfdir}

%if 0%{?suse_version} >= 1120
%verifyscript -n cdrecord
%{verify_permissions -e %{_bindir}/cdrecord -e %{_bindir}/readcd}

%verifyscript -n cdda2wav
%{verify_permissions -e %{_bindir}/cdda2wav}

%endif

%post -n cdrecord
%if 0%{?set_permissions:1} > 0
     %set_permissions %{_bindir}/cdrecord %{_bindir}/readcd
%else
    %{run_permissions}
%endif
true

%post -n cdda2wav
%if 0%{?set_permissions:1} > 0
     %set_permissions %{_bindir}/cdda2wav
%else
    %{run_permissions}
%endif
true

%files
%defattr(-,root,root,-)
%doc ABOUT AN* CDDL.Schily.txt COPYING Changelog Changelog.1 GPL-2.0.txt
%doc LGPL-2.1.txt README.linux-shm READMEs/README.linux

%files devel
%defattr(-,root,root,-)
%doc CDDL.Schily.txt COPYING GPL-2.0.txt LGPL-2.1.txt
%{_includedir}/scg/
%{_includedir}/schily/
%{_libdir}/lib*.a
%dir %{_libdir}/profiled
%{_libdir}/profiled/lib*.a
%doc %{_mandir}/man5/makefiles.5%{ext_man}
%doc %{_mandir}/man5/makerules.5%{ext_man}

%files -n btcflash
%defattr(-,root,root,-)
%doc CDDL.Schily.txt COPYING
%{_bindir}/btcflash
%doc %{_mandir}/man1/btcflash.1%{ext_man}

%files -n cdda2wav
%defattr(-,root,root,-)
%doc CDDL.Schily.txt
%doc cdda2wav/Changelog cdda2wav/FAQ cdda2wav/Frontends cdda2wav/HOWTOUSE
%doc cdda2wav/NEEDED cdda2wav/README cdda2wav/THANKS cdda2wav/TODO
%doc cdda2wav/tracknames.txt
%doc libparanoia/README.paranoia
%{_bindir}/cdda2mp3
%{_bindir}/cdda2mp3.new
%{_bindir}/cdda2ogg
%attr(0755,root,root) %caps_cdda2wav %verify(not mode caps) %{_bindir}/cdda2wav
%{_bindir}/inf2cdtext.pl
%{_bindir}/list_audio_tracks
%{_bindir}/pitchplay
%{_bindir}/readmult
%{_bindir}/tracknames.pl
%doc %{_mandir}/man1/cdda2mp3.1%{ext_man}
%doc %{_mandir}/man1/cdda2ogg.1%{ext_man}
%doc %{_mandir}/man1/cdda2wav.1%{ext_man}
%config %_sysconfdir/permissions.d/cdda2wav.*

%files -n cdrecord
%defattr(-,root,root,-)
%doc CDDL.Schily.txt START
%doc cdrecord/COPYING cdrecord/README cdrecord/README.ATAPI
%doc cdrecord/README.DiskT@2 cdrecord/README.WORM cdrecord/README.audio
%doc cdrecord/README.cdplus cdrecord/README.cdrw cdrecord/README.cdtext
%doc cdrecord/README.clone cdrecord/README.copy cdrecord/README.multi
%doc cdrecord/README.parallel cdrecord/README.raw cdrecord/README.rscsi
%doc cdrecord/README.sony cdrecord/README.verify cdrecord/README.volmgt
%doc rscsi/default-rscsi.sample
%config %{_sysconfdir}/default/cdrecord
%config %{_sysconfdir}/default/rscsi
%config %{_sysconfdir}/permissions.d/cdrecord.*
%verify(not mode caps) %caps_cdrecord %attr(0755,root,root) %{_bindir}/cdrecord
%verify(not mode caps) %caps_readcd %attr(0755,root,root) %{_bindir}/readcd
%{_bindir}/scgcheck
%{_bindir}/scgskeleton
%{_sbindir}/rscsi
%doc %{_mandir}/man1/cdrecord.1%{ext_man}
%doc %{_mandir}/man1/readcd.1%{ext_man}
%doc %{_mandir}/man1/rscsi.1%{ext_man}
%doc %{_mandir}/man1/scgcheck.1%{ext_man}
%doc %{_mandir}/man1/scgskeleton.1%{ext_man}

%files -n mkisofs
%defattr(-,root,root,-)
%doc CDDL.Schily.txt GPL-2.0.txt
%doc mkisofs/COPYING mkisofs/ChangeLog mkisofs/ChangeLog.mkhybrid
%doc mkisofs/README mkisofs/README.* mkisofs/RELEASE mkisofs/TODO
%doc mkisofs/diag/README.diag
%{_bindir}/devdump
%{_bindir}/hdisk.pl
%{_bindir}/isodebug
%{_bindir}/isodump
%{_bindir}/isoinfo
%{_bindir}/isovfy
%{_bindir}/mkhybrid
%{_bindir}/mkisofs
%{_libdir}/siconv/
%doc %{_mandir}/man8/devdump.8%{ext_man}
%doc %{_mandir}/man8/isodebug.8%{ext_man}
%doc %{_mandir}/man8/isodump.8%{ext_man}
%doc %{_mandir}/man8/isoinfo.8%{ext_man}
%doc %{_mandir}/man8/isovfy.8%{ext_man}
%doc %{_mandir}/man8/mkhybrid.8%{ext_man}
%doc %{_mandir}/man8/mkisofs.8%{ext_man}

%changelog