Name:            libquicktime
Version:         1.1.4
Release:         2%{?_dist_release}
License:         LGPLv2+
Group:           System Environment/Libraries
Source0:         http://prdownloads.sourceforge.net/libquicktime/%{name}-%{version}.tar.gz
URL:             http://libquicktime.sourceforge.net/
Summary:         A Library for reading and writing quicktime files
Summary(ja):     QuickTime ファイルを読み書きするためのライブラリ

Vendor:          Project Vine
Distribution:    Vine Linux
BuildRoot:       %{_tmppath}/%{name}-%{version}-root

BuildRequires:   libvorbis-devel
BuildRequires:   libpng-devel
BuildRequires:   libjpeg-devel
BuildRequires:   gtk2-devel 
BuildRequires:   libdv-devel
BuildRequires:   libraw1394-devel
BuildRequires:   libavc1394-devel

BuildRequires:   alsa-lib-devel
BuildRequires:   zlib-devel
BuildRequires:   gettext-devel
BuildRequires:   mesa-libGL-devel
BuildRequires:   libX11-devel
BuildRequires:   libICE-devel
BuildRequires:   libSM-devel
BuildRequires:   libXext-devel
BuildRequires:   libXmu-devel
BuildRequires:   libXpm-devel
BuildRequires:   libXt-devel
BuildRequires:   libXaw-devel >= 1.0.5
BuildRequires:	 libXv-devel

##BuildRequires:   ffmpeg-devel
##BuildRequires:   lame-devel
##BuildRequires:   faad2-devel
##BuildRequires:   faac-devel
##BuildRequires:   x264-devel

%description
Libquicktime is a library for reading and writing QuickTime files
on UNIX systems. Video CODECs supported by this library are OpenDivX, MJPA,
JPEG Photo, PNG, RGB, YUV 4:2:2, and YUV 4:2:0 compression.  Supported
audio CODECs are Ogg Vorbis, IMA4, ulaw, and any linear PCM format.

Libquicktime is based on the quicktime4linux library.  Libquicktime add
features such as a GNU build tools-based build process and dynamically
loadable CODECs.

%description -l ja
libquicktimeはUNIX 系のシステムでQuickTimeファイルを読み書きするための
ライブラリです．ビデオエンコード：OpenDivX、MJPA、JPEG Photo、PNG、RGB、
YUV 4:2:2、YUV 4:2:0、オーディオエンコード：Ogg Vorbis、IMA4、ulaw、そ
の他線型PCM形式をサポートします．

%package devel
Summary:         Development files from the libquicktime library
Summary(ja):     libquicktime の開発ライブラリ
Group:           Development/Libraries
Requires:        %{name} = %{version}
Requires:        zlib-devel

%description devel
libquicktime is a library for reading and writing quicktime files. It
is based on the quicktime4linux library, with many extensions.

You will need to install this development package if you intend to rebuild
programs that need to access quicktime files using libquicktime.

%description -l ja devel
libquicktime の開発ライブラリです．

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

%build
%configure \
    --disable-static \
    --disable-dependency-tracking \
    --disable-rpath \
    --with-cpuflags="$RPM_OPT_FLAGS" \
    --without-doxygen \
    --with-libdv \
    --enable-gpl \
    --enable-libswscale \
    %ifarch %{ix86} x86_64
	--enable-mmx \
    %else
	--disable-mmx \
    %endif
	;

# remove rpath from libtool
%__sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
%__sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

%__make %{?_smp_mflags}


%install
%{__rm} -rf %{buildroot}
%makeinstall

## remove unuse files
find $RPM_BUILD_ROOT%{_libdir} -type f -a -name \*.la -exec rm -f {} \;

%find_lang %{name}

%clean
%{__rm} -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/lqtplay
%{_bindir}/lqt_transcode
%{_bindir}/qt*
%{_libdir}/*.so.*
%dir %{_libdir}/libquicktime/
%{_libdir}/libquicktime/*.so
%{_mandir}/man1/*

%files devel
%defattr(-, root, root, 0755)
%{_bindir}/libquicktime_config
%{_bindir}/lqt-config
%{_includedir}/*
%{_libdir}/*.so
%dir %{_libdir}/libquicktime/
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4


%changelog
* Sat Mar 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.1.4-2
- change release to sync with self-build-libquicktime.spec

* Wed Feb 17 2010 Munehiro Yamamoto <munepi@vinelinux.org> 1.1.4-1
- new upstream release

* Sun Jun 28 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.1.2-1
- new upstream release
- changed License: LGPLv2
- added some configure options

* Sun Nov 09 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.3-2
- rebuild with libXaw.so.7 (libXaw-1.0.5)

* Mon Sep 29 2008 Shu KONNO <owa@bg.wakwak.com> 1.0.3-1vl5
- applied new versioning policy, spec in utf-8
- updated libquicktime to 1.0.3

* Thu Aug  3 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9.9-0vl1
- new upstream release
- License is LGPL
- added libquicktime.pc to devel package

* Mon Feb 21 2005 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
- Inital package for VineLinux3.1
