File libXMP4_4.spec of Package libXMP4_4

Name: libXMP4_4
Version: 4.4.2
Release: 0
License: BSD (3-clause, Adobe)
Group:	Productivity/Graphics/Convertors
URL:	http://www.adobe.com/devnet/xmp/
Summary: Library to embed metadata in files

BuildRequires: gcc-c++ libstdc++-devel zlib-devel
%if 0%{?fedora_version} > 0
BuildRequires: expat-devel
%else
BuildRequires: libexpat-devel
%endif
#Source: XMP-Toolkit-SDK-4.4.2.zip  
Source: XMP-Toolkit-SDK-4.4.2.tar.bz2
Patch:  xmp-compile.diff
Patch1: xmp-Makefile.diff
Patch2:	xmp-strcmp.diff
Patch3:	xmp-snprintf.diff
Patch4: libXMP-auto-endian.diff

AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr

%description
Adobe's Extensible Metadata Platform (XMP) is a labeling technology that allows you to embed data about a file, known as metadata, into the file itself. More information on how partners and standards are using XMP is available at the XMP website.

%package -n libXMP-devel
Requires: %{name} = %{version}
Summary: Headers for the XMP metadata library
Group: Development/Libraries/C and C++

%description -n libXMP-devel
This package contains the header files (and the .so shared libary link)
to allow compilation of software using libxmp.

%package -n libXMP-doc
Summary: Documentation for the XMP format and the library
License: XMP Specification Public Patent License
Group: Documentation/HTML

%description -n libXMP-doc
Documentation for the XMP format and the libxmp library.

%prep
%setup -n XMP-Toolkit-SDK-4.4.2
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1


%build
cd build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?jobs:-j%jobs}

%install
cd build
make install PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}
chmod -x ../docs/API/*.jpg
#rm $RPM_BUILD_ROOT/%{_libdir}/libXMP.so.4.4

%files
%defattr(-,root,root)
%{_libdir}/libXMP.so.*
%doc BSD-License.txt

%files -n libXMP-devel
%defattr(-,root,root)
%{_libdir}/libXMP.so
%{_prefix}/include/xmp_sdk

%files -n libXMP-doc
%defattr(-,root,root)
%doc docs/*.pdf
%doc docs/API

%post
%if 0%{?suse_version} > 0
%{run_ldconfig}
%else
ldconfig
%endif

%postun
%if 0%{?suse_version} > 0
%{run_ldconfig}
%else
ldconfig
%endif

%changelog
* Sat Jan 11 2014 - kurt@garloff.de
- Determine endianness automatically.
* Tue Mar 24 2009 - garloff@suse.de
- Inital package creation.