# To make nosrc.rpm
# rpm -bs --define 'nosrc 1'

Summary: An X Window System based tool for creating CDs.
Summary(ja): X上で動作するCD-Rライターです。
Name: xcdroast
Version: 0.98alpha15
Release: 1%{?_dist_release}
License: GPL
Group: Applications/Multimedia
URL: http://www.xcdroast.org/
Source: http://www.xcdroast.org/download/%{name}-%{version}.tar.gz
%{?nosrc:NoSource:     0}
Source10: xcdroast.desktop
Patch0: xcdroast-0.98alpha15-nowarn-2.patch
Patch1: xcdroast-0.98alpha15-dev-cdrom.patch
Patch10: xcdroast-0.98alpha15-dvd.patch.bz2
Patch11: xcdroast-0.98alpha15-64bit_gsize.diff

BuildPreReq: cdrtools-devel >= 2.01-0vl1
BuildPrereq: gtk2-devel, desktop-file-utils, pcre-devel
PreReq: cdrtools-cdda2wav >= 2.01-0vl1
PreReq: cdrtools-cdrecord >= 2.01-0vl1
Requires: cdrtools-mkisofs >= 2.01-0vl1
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Vendor: Project Vine
Distribution: Vine Linux

%define icondir %{_datadir}/pixmaps

# set where the utils/images of xcdroast should be installed
# - default: /usr/lib/xcdroast-0.98
%define xcdroast_libdir %{_libdir}/%{name}-0.98

%description
X-CD-Roast provides a GUI interface for commands like cdrecord and
mkisofs. X-CD-Roast includes a self-explanatory X11 user interface,
automatic SCSI hardware setup, support for mastering of new
ISO9660 data CDs, support for production of new audio CDs, fast
copying of CDs without hard disk buffering, and a logfile option.

%description -l ja
X 上で動作する CD-R ライターです。
CD-R 焼き付けプログラムである "cdrecord" と 
CD イメージ作成プログラムである "mkisofs" の
フロントエンドとして動作し、データ CD、音楽 CD の作成、コピーができます。

%prep
%setup -q
%patch0 -p1 -b .nowarn
%patch1 -p1 -b .dev_cdrom
%patch10 -p1 -b .dvd
%patch11 -p1 -b .64bit_gsize

%build
%configure \
	--enable-gtk2 \
	--disable-nonrootmode \
	--with-cdrtools-prefix=%{_prefix} \
	--with-xcdroast-libdir-prefix=%{xcdroast_libdir} \

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

# install icons
mkdir -p $RPM_BUILD_ROOT/%{icondir}
cp -p xpms/xcdricon.xpm $RPM_BUILD_ROOT/%{icondir}
cp -p lib/icons/xcdricon.* $RPM_BUILD_ROOT/%{icondir}

# install desktop files
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install \
	--vendor=xcdroast \
	--dir %{buildroot}%{_datadir}/applications \
	--add-category Application \
	--add-category AudioVideo \
	%{SOURCE10}


%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc doc/* ChangeLog COPYING README
%dir %{xcdroast_libdir}
%dir %{xcdroast_libdir}/bin
%{xcdroast_libdir}/bin/xcdrwrap
%{xcdroast_libdir}/bin/*tool
%{xcdroast_libdir}/bin/wavplay
%{xcdroast_libdir}/icons
%{xcdroast_libdir}/sound
%{_bindir}/*
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{icondir}/*
%{_datadir}/applications/xcdroast.desktop
%{_mandir}/man1

%changelog
* Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 0.98alpha15-1vl5
- applied new versioning policy, spec in utf-8

* Fri Aug 31 2007 Shu KONNO <owa@bg.wakwak.com> 0.98alpha15-0vl8
- added %%define xcdroast_libdir %%{_libdir}/%%{name}-0.98
- added %%{_mandir}/man1 in %%files section
- added Patch11: xcdroast-0.98alpha15-64bit_gsize.diff (from suse)
- changed Multimedia to AudioVideo at desktop-file-install

* Sat Sep 16 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.98alpha15-0vl7
- import and modify nowarn.patch (patch0) to remove warning
- add dev_cdrom.patch (patch1) to use /dev/cdrom* (<BTS:183>)
  - this patch is a part of FC's scan.patch

  * Fri Sep 10 2004 Harald Hoyer <harald@redhat.com> - 0.98a15-6
  - improved scanning and removed warnings

* Fri Sep 15 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.98alpha15-0vl6
- updare required version of cdrtools
- drop setgid bit from xcdrwrap
- drop %%pre,post,posun script
- add --disable-nonrootmode to %%configure to burn as user

* Mon Aug 15 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.98alph15-0vl5
- add -g option for groupadd to use lower gid.
- add %%postun to remove cdwrite group.

* Sat Jun 19 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.98alph15-0vl4
- add unofficial DVD support patch
  http://people.mandrakesoft.com/~warly/files/cdrtools/
- add Requires: cdrtools-cdrecord >= 2.01-0.a31vl2

* Sun Jun  6 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.98alpha15-0vl3
- build with gtk2
- update desktop file
- do not make sg devices in %%post script

* Sat Jan 17 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.98alpha15-0vl2
- rebuild for VineSeedPlus

* Wed Jan 14 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.98alpha15-0vl1
- source upgrade
- remove patches
- add BuildPrereq: gtk+-devel >= 1.2.3, gdk-pixbuf-devel >= 0.8.0

* Tue Sep 23 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.98alpha14-0vl2
- add URL tag
- rebuild with cdrtools-2.01-0.a19vl1
- fix applnk for Icon

* Tue Jun  3 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.98alpha14-0vl1
- source upgrade
- add patch0 and patch1 for ONLY this source from xcdroast.org
- SECURITY: Requires: cdrtools-* >= 2.01-0.a15

* Sat May 24 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.98alpha13-0vl1
- source upgrade
- build with cdrtools-2.01-0.a14vl1

* Wed Dec  4 2002 Tomoya TAKA <taka@vinelinux.org> 0.98alpha11-0vl2
- remove Requires: cdrtools, PreReq: cdrtools-devel
- add PreReq: cdrtools-cdrecord, cdrtools-cdda2wav
- add BuildPreReq: cdrtools-devel

* Mon Dec  2 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.98alpha11-0vl1
- new upstream release
- rebuild with new environment.

* Wed May 22 2002 Masaki Shinomiya <shino@pos.to>
- 0vl8 for Vine-2.1.x, -0vl9 for VineSeed
- set suid on cdda2wav, avoid checking suid of mkisofs
- language.def

* Mon Apr 22 2002 Masaki Shinomiya <shino@pos.to>
- 0.98alpha9-0vl6 for Vine-2.1.x, -0vl7 for Vine-2.5
- owner and permission of mkisofs and cdda2wav set to root:root 755.
- prerequire cdrecord
- applnk, application group

* Sun Mar 31 2002 Jun Nishii <jun@vinelinux.org>0.98alpha9-0vl5 
- build for Vine Linux 2.5

*Mon Jan 14 2002 Masaki Shinomiya <shino@pos.to>
- 0.98alpha9-0vl4 for VineSeed 
- 0.98alpha9-0vl3 for VinePlus
* Fri Jan 4 2002 Masaki Shinomiya <shino@pos.to>
- 0.98alpha9-0vl2.2
- modified menu text in create
- proper defalt name of boot.cataloge
- new japanese menu and help text

* Thu Jul 26 2001 <sagami@vinelinux.org>
- 0.98alpha9-0vl2: tweak spec and added more docs

* Thu Jul 26 2001 Masaki Shinomiya <shino@pos.to>
- 0.98alpha9-0vl1
- eliminate link around xcdrgdk
- eliminate no need  requires of tcl/tk's

* Sun Jun 24 2001 Masaki Shinomiya <shino@pos.to>
-  0.98alpha8-1vl2
-  add group 'cdwrite' before installing
-  add some transration

* Sun Jun 24 2001 Masaki Shinomiya <shino@pos.to>
-  rename for VinePlus as 0.98alpha8-1vl1
- changed requires

* Sat Jun 16 2001 Masaki Shinomiya <shino@pos.to>
- 0.98alpha8-1
- with Japanese panel

* Mon Jun 12 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 0.96e-2vl3
- included a patch for ppc (from 0.96e-1 of LinuxPPC/contrib)

* Wed Apr 15 1999 Michael Maher <mike@redhat.com>
- built package for 6.0
- updated source

* Tue Oct 13 1998 Michael Maher <mike@redhat.com>
- rushed by wanger.. not updated

* Wed May 20 1998 Michael Maher <mike@redhat.com>
- built and updated package
- added changelog
- edited paths  
