Name: cdrdao
Summary: Writes audio CD-Rs in disk-at-once (DAO) mode.
Summary(ja): ディスクアットワンス（DAO）モードでオーディオデータを CD-R へ書き込むツール
Version: 1.2.3
Release: 3%{?_dist_release}

Group: Applications/Multimedia
License: GPLv2+
URL: http://cdrdao.sourceforge.net/

Source0:   http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
# Missing includes causes failure build
Patch1: cdrdao-1.2.3-stat.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtkmm2-devel
BuildRequires: libgnomeuimm-devel
BuildRequires: libsigc++-devel
BuildRequires: libao-devel
BuildRequires: libvorbis-devel >= 1.0
BuildRequires: libSM-devel
BuildRequires: libICE-devel 
#BuildRequires: pccts >= 1.33mr33

Vendor: Project Vine
Distribution: Vine Linux

%description
Cdrdao records audio CD-Rs in disk-at-once (DAO) mode, based on a
textual description of the CD contents. Recording in DAO mode writes
the complete disc (lead-in, one or more tracks, and lead-out) in a
single step.

%description -l ja
Cdrdaoはディスクアットワンス（DAO）モードでaudioをCD-Rへ記録します。
CD中身の原文の説明に基づきます。DAOモードのレコーディングは、一回のステップに完全なディスク（lead-in、一つ以上のトラックとlead-out）を書きます。


%package -n gcdmaster
Summary: Graphical front end to cdrdao for composing audio CDs
Group: Applications/Multimedia
Requires: %{name} = %{version}
Requires(post): shared-mime-info
Requires(postun): shared-mime-info

%description -n gcdmaster
gcdmaster allows the creation of toc-files for cdrdao and can control
the recording process. Its main application is the composition of
audio CDs from one or more audio files. It supports PQ-channel editing,
entry of meta data like ISRC codes/CD-TEXT and non destructive cut of
the audio data.


%prep
%setup -q
%patch1 -p1 -b .stat

%build
%configure \
        --with-xdao \
        --without-scglib \
        --without-mp3-support \
        --without-lame
# --with-pcctsinc=%{_includedir}/pccts \
#           --without-lame \
#           --without-mp3-support

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'


%pre -n gcdmaster
if [ $1 -gt 1 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
        %{_sysconfdir}/gconf/schemas/gcdmaster.schemas >& /dev/null ||:
fi

%post -n gcdmaster
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gcdmaster.schemas >& /dev/null ||:

%posttrans -n gcdmaster
update-mime-database %{_datadir}/mime >& /dev/null ||:

%preun -n gcdmaster
if [ $1 -eq 0 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
        %{_sysconfdir}/gconf/schemas/gcdmaster.schemas >& /dev/null ||:
fi

%postun -n gcdmaster
if [ $1 -eq 0 ] ; then
    update-mime-database %{_datadir}/mime >& /dev/null ||:
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/cdrdao
%{_datadir}/cdrdao/*
%{_bindir}/toc2*
%{_bindir}/cue2toc
%{_mandir}/man1/*.gz
%doc AUTHORS COPYING CREDITS ChangeLog README NEWS README.PlexDAE README.Win32

%files -n gcdmaster
%defattr(-,root,root)
%doc AUTHORS COPYING README 
%{_sysconfdir}/gconf/schemas/gcdmaster.schemas
%{_bindir}/gcdmaster
%{_datadir}/application-registry/*
%{_datadir}/applications/*
%{_datadir}/gcdmaster
%{_datadir}/mime-info/*
%{_datadir}/mime/packages/*
%{_datadir}/pixmaps/*

%changelog
* Fri Jul 06 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.3-3
- rebuild with libao-1.1.0

* Tue Apr 19 2011 Ryoichi INAGAKI <daisuke@linux.or.jp> 1.2.3-2
- fixed %%changelog
- added BR: libSM-devel and libICE-devel

* Sat Apr 16 2011 Ryoichi INAGAKI <daisuke@linux.or.jp> 1.2.3-1
- updated to 1.2.3
- rebuilt with current VineSeed

* Tue Apr 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.2-4
- add --without-mp3-support

* Tue Mar 24 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.2-3
- add --without-lame
- remove BR: libmad-devel

* Sat Oct  4 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.2-2vl5
- added BuildRequires: libao-devel, libmad-devel

* Fri Sep 19 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.2-1vl5
- applied new versioning policy, spec in utf-8
- added cdrdao-1.2.2-sigc.patch from mdv
    * Tue Sep 11 2007 Adam Williamson <awilliamson@mandriva.com> 1.2.2-5mdv2008.0
    + Revision: 84331
    - add patch0 to fix compilation issue caused by use of old sigc++ API

* Sat Nov  4 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.2-0vl1
- update to 1.2.2
- fixed BuildRequires and Prereq

* Mon May 22 2006 TOSHI <vine-jp@mail.goo.ne.jp> 1.1.9-0vl1
- update to 1.1.9
- added Requires -> libstdc++2_10,libstdc++2_10-compat

* Mon Jun 10 2002 Tomoya TAKA <taka@vinelinux.org> 1.1.5-7vl2
- separate gcdmaster into subpackage
- add /etc/profile.d/gcdmaster.{sh,csh} to exec gcdmaster on C locale
# end of file
