#
# spec file for package vcdimager
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define sonum 0
Name:           vcdimager
Version:        2.0.1
Release:        3.5
Summary:        Video CD (VCD) authoring software
# Alternative URL with SCM https://github.com/rocky/vcdimager
License:        GPL-2.0-only
Group:          Productivity/Multimedia/CD/Record
URL:            http://www.vcdimager.org/
Source:         https://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz
Source1:        https://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz.sig
Source2:        baselibs.conf
Patch1:         sector_private.patch
BuildRequires:  fdupes
BuildRequires:  gawk
BuildRequires:  gcc-c++
BuildRequires:  help2man
BuildRequires:  libtool
BuildRequires:  makeinfo
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libcdio) >= 2.0.0
BuildRequires:  pkgconfig(libiso9660) >= 2.0.0
BuildRequires:  pkgconfig(libxml-2.0) >= 2.3.8
BuildRequires:  pkgconfig(popt)
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}

%description
GNU VCDImager is a full-featured mastering suite for authoring,
disassembling and analyzing Video CDs and Super Video CDs.

%package -n libvcdinfo%{sonum}
Summary:        Video CD (VCD) authoring software
Group:          System/Libraries

%description -n libvcdinfo%{sonum}
GNU VCDImager is a full-featured mastering suite for authoring,
disassembling and analyzing Video CDs and Super Video CDs.
This is the core library

%package devel
Summary:        Video CD (VCD) authoring software
Group:          Development/Languages/C and C++
Requires:       libvcdinfo%{sonum} = %{version}-%{release}

%description devel
GNU VCDImager is a full-featured mastering suite for authoring,
disassembling and analyzing Video CDs and Super Video CDs.

%prep
%autosetup -p1

%build
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS) -D_GNU_SOURCE"
%configure \
  --disable-silent-rules \
  --enable-shared \
  --disable-static
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}%{_mandir}

# Does not work with paranoia available
#%%check
#make %{?_smp_mflags} check

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}

%post -n libvcdinfo%{sonum} -p /sbin/ldconfig
%postun -n libvcdinfo%{sonum} -p /sbin/ldconfig

%files
%doc AUTHORS NEWS README THANKS
%{_bindir}/*
%{_infodir}/*.info%{?ext_info}
%{_mandir}/man?/*%{ext_man}

%files -n libvcdinfo%{sonum}
%license COPYING
%{_libdir}/libvcdinfo.so.0*

%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*

%changelog
* Fri Jun 29 2018 olaf@aepfle.de
- Add versioned pkgconfig BuildRequires
- Remove unused cdparanoia from BuildRequires
* Mon Jun 11 2018 tchvatal@suse.com
- Update to 2.0.1 (bsc#1108134, bsc#1094761):
  * Upstream tagged tarball with the libcido fixes bellow so use
    the release tarball instead of cvs snapshot
- Completely drop vcdimager-texinfo-5.0.patch as it was fixed
  upstream
* Mon Jun 11 2018 tchvatal@suse.com
- Version update to 0.7.24+cvs20180611:
  * Fixes for libcdio-2.0.0 and 2.2.0
- Rebase patch vcdimager-texinfo-5.0.patch
- Drop merged patch vcdimager-libcdio-0.93-testsuite.patch
* Mon Jul 24 2017 jengelh@inai.de
- Fix scriptlet running order
* Wed Jul 19 2017 tchvatal@suse.com
- Cleanup the dependencies a bit to cope well with the current
  TW state
- Fix infopages install/uninstall
- Redo the cvs tarball and add date of the creation of the tarball
  * still one should check next time if there are some changes
* Thu Feb 12 2015 dimstar@opensuse.org
- Add vcdimager-libcdio-0.93-testsuite.patch: Fix test suite run
  with libcdio 0.93: the debug info is much more verbose, which
  needs to be taken into account. The patch is applied
  conditionally on the presence of libcdio >= 0.93.
* Mon Feb  9 2015 dimstar@opensuse.org
- Add vcdimager-texinfo-5.0.patch: Fix build with texinfo 5.0.
* Fri Jun 21 2013 crrodriguez@opensuse.org
- Build with large file support in 32 bit archs
- remove leftover debug statement in the spec file
* Sat Mar  2 2013 seife+obs@b1-systems.com
- fix build with automake-1.13
* Sat Oct  6 2012 schwab@linux-m68k.org
- Add help2man and --enable-maintainer-mode to get non-empty manpages
* Sat Sep  8 2012 idonmez@suse.com
- Add explicit build dependency on makeinfo
* Thu Apr 26 2012 davejplater@gmail.com
- Removed libcdio-paranoia from build requires. See bnc#756564
* Sat Apr  7 2012 davejplater@gmail.com
- Update to 0.7.24cvs to fix build with libcdio-0.83
- See ChangeLog for upstream changes.
* Thu Mar 29 2012 davejplater@gmail.com
- Split off libvcdinfo0 as a separate package and cleaned up spec.
* Wed Dec 21 2011 coolo@suse.com
- remove call to suse_update_config (very old work around)
* Thu Apr  7 2011 jw@novell.com
- version 0.7.24, GPLv2 is now upstream.
- strncat-patch is now upstreamed.
- new copyright patch added, to fulfill Joerg's last wish in bnc#672491
* Thu Mar 17 2011 cfarrell@novell.com
- license update: GPLv2
  Heiko Eissfeldt and Joerg Schilling insist on GPLv2 only license
  for reed solomon in sector.c etc. See bnc#672491. Upstream has
  changed the license also"
* Mon Aug 23 2010 coolo@novell.com
- opensuse_bs is no longer set
* Mon Feb  1 2010 jengelh@medozas.de
- package baselibs.conf
* Wed Apr 15 2009 crrodriguez@suse.de
- remove static libraries and "la" files
* Wed Jan  7 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Tue Sep 11 2007 sbrabec@suse.cz
- Break build loop vcdimager -> libcdio -> vcdimager.
* Tue Mar  6 2007 ckornacker@suse.de
- Code cleanup.
* Fri Jun 30 2006 sbrabec@suse.cz
- Fixed cyclic dependencies in a correct way.
* Thu Jun 22 2006 sbrabec@suse.cz
- Simpler solution of cyclic dependencies.
* Tue Jan 31 2006 sbrabec@suse.cz
- Do not link with invalid rpath.
- Enabled parallel build.
- Fixed devel splitting.
* Thu Jan 26 2006 sbrabec@suse.cz
- Added %%install_info_prereq.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 26 2005 sbrabec@suse.cz
- Build with libcdio-0.76.
* Fri Aug  5 2005 sbrabec@suse.cz
- Build with libcddb-1.2.1.
* Fri Jul 29 2005 sbrabec@suse.cz
- Updated to version 0.7.23.
* Fri Jun  3 2005 meissner@suse.de
- fixed overflow.
* Mon May 16 2005 sbrabec@suse.cz
- Updated to version 0.7.22.
* Mon May  9 2005 sbrabec@suse.cz
- Build with libcddb-1.0.2.
* Tue Apr 26 2005 sbrabec@suse.cz
- Build with libcdio-0.73 and libcddb-1.0.1.
* Mon Apr 11 2005 sbrabec@suse.cz
- fixed gcc4 compile problem.
* Thu Feb  3 2005 sbrabec@suse.cz
- Build with libcdio-0.72.
* Mon Jan 31 2005 sbrabec@suse.cz
- Build with libcdio-0.72rc2.
* Mon Jan 24 2005 sbrabec@suse.cz
- Updated to version 0.7.21.
* Mon Jan 24 2005 sbrabec@suse.cz
- Ported to libcdio-0.71 API.
* Tue Nov  9 2004 sbrabec@suse.cz
- Updated to version 0.7.20.
- Work-around of circular dependency on libcdio.
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Thu Aug 14 2003 sbrabec@suse.cz
- Updated to version 0.7.14.
* Mon Jun 16 2003 coolo@suse.de
- use BuildRoot
- some fixes
* Mon Feb 10 2003 sbrabec@suse.cz
- Updated to version 0.7.12.
* Tue Nov  5 2002 ro@suse.de
- fix configure for libxml2
* Wed Apr 24 2002 uli@suse.de
- added suse_update_config call (fixes x86-64)
* Thu Feb 14 2002 uli@suse.de
- added cdxa2mpeg from contrib (mentioned in docs, bug #13252)
* Wed Dec  5 2001 uli@suse.de
- update -> 0.7.11
  * improved linux cdrom support by adding support for the generic packet
  cdrom interface
  * fixed libxml2 external entity loader
  * fixed minor subheader bug
  * be more tolerant when vcdxrip'ing faulty PBCs
  * new "leadout pregap" option
  * added 3 "-no*" options to vcdxrip
* Thu Aug 30 2001 uli@suse.de
- update -> 0.7.10
  * vcdxrip: new option for ignoring (faulty) extended pbc's
  * gui mode added to vcdxbuild, vcdxminfo and vcdxrip
  * progress display added to vcdxbuild and vcdxminfo
  * rewrite/improvement of MPEG scanning code (detect audio parameters)
  * new option "svcd vcd30 tracksvd"
  * implemented setting of <publisher-id>
* Thu Aug  2 2001 uli@suse.de
- update -> 0.7.9
- fixed for IA64
* Thu Jul 12 2001 uli@suse.de
- initial package