File vdr-plugin-skinnopacity.spec of Package vdr-plugin-skinnopacity

%define pluginname skinnopacity
%define pluginversion 1.1.3
Name:           vdr-plugin-%{pluginname}
BuildRequires:  gcc-c++ vdr-devel pkg-config libMagick++-devel libcurl-devel libxml2-devel fdupes
License:        GPL-2.0
Group:          Hardware/TV
Summary:        "nOpacity" is a highly customizable native true color skin for the VDR
Url:            http://projects.vdr-developer.org/projects/skin-nopacity
Version:        %{pluginversion}
Release:        0.0
Source0:        vdr-%{pluginname}-%{pluginversion}.tar.bz2
Requires:	vdr(abi) = %{vdr_apiversion}
Requires:       vdr-plugin-skinnopacity-data = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define srcdir %{pluginname}-%{pluginversion}

%description
"nOpacity" is a highly customizable native true color skin for the Video Disc Recorder.

%package -n vdr-plugin-skinnopacity-data
Group:          Hardware/TV
Summary:        The image data for the VDR skin nOpacity
BuildArch:      noarch
Requires:       vdr-plugin-skinnopacity = %{version}

%description -n vdr-plugin-skinnopacity-data
The image data for the VDR skin nOpacity.

%debug_package

%prep
%setup -q -n %{pluginname}-%{pluginversion}
tar xvf %SOURCE0
cd %{srcdir}

%build
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
%{vdr_find_locale}

cd %{buildroot}/%{_datadir}/vdr/plugins/skinnopacity/icons
for file in */skinElements/channellogoback.png
do
  mv $file $file.orig
  convert $file.orig $file
  rm $file.orig
done
%fdupes %{buildroot}/%{_datadir}/vdr/plugins/skinnopacity

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f vdrlocale.files
%defattr(-,root,root)
%{_libdir}/vdr/*
%attr(-,vdr,users) %config /etc/vdr/themes/*
%attr(-,vdr,users) %dir /etc/vdr/plugins/
%attr(-,vdr,users) %dir /etc/vdr/plugins/skinnopacity/
%attr(-,vdr,users) %dir /etc/vdr/plugins/skinnopacity/themeconfigs/
%attr(-,vdr,users) %config /etc/vdr/plugins/skinnopacity/themeconfigs/*
%{vdr_dirs}
%attr(-,vdr,users) %dir /etc/vdr
%attr(-,vdr,users) %dir /etc/vdr/themes
%doc %srcdir/COPYING %srcdir/HISTORY %srcdir/README

%files -n vdr-plugin-skinnopacity-data
%dir %{_datadir}/vdr/plugins
%dir %{_datadir}/vdr/plugins/skinnopacity
%dir %{_datadir}/vdr/plugins/skinnopacity/icons
%dir %{_datadir}/vdr/plugins/skinnopacity/icons/*
%{_datadir}/vdr/plugins/skinnopacity/icons/*/*

%changelog