Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 7108f30ae691862c2e96d369efe31be2 > files > 1

libst2205-1.4.3-2.fc14.src.rpm

Name:           libst2205
Version:        1.4.3
Release:        2%{?dist}
Summary:        Library for accessing the display of hacked st2205 photo frames
Group:          System Environment/Libraries
License:        GPLv3+
URL:            http://picframe.spritesserver.nl/wiki/index.php
# Note the st2205tool includes tools to actually hack the pictureframe, this is
# something which should only be done by experienced techies and which we
# should not package. We do want to package the lib (which also is the only
# thing make install installs), hence the packagename is libst2205.
Source0:        http://www.neophob.com/files/st2205tool-1.4.3.tar.gz
Patch0:         st2205tool-1.4.3-no-exit.patch
Patch1:         st2205tool-1.4.3-width-height-swap.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  gd-devel

%description
It is possible to flash digital photo frames with the st2205 chip-sets with
a modified firmware, which allows one to display real time images on the
display of the frame from a PC. This package contains a library for accessing
the display from the PC, for st2205 frames with the hacked firmware.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package tools
Summary:        Tools for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description tools
This package contains the st2205 set picture utility which can be used to
display a (properly sized) PNG file on a supported picture frames display.


%prep
%setup -q -n st2205tool
%patch0 -p1
%patch1 -p1


%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC" -C libst2205
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -I../libst2205" -C setpic


%install
rm -rf $RPM_BUILD_ROOT
# make install does not support DESTDIR nor PREFIX, DIY
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
install -m 755 setpic/setpic $RPM_BUILD_ROOT%{_bindir}/st2205-setpic
install -m 755 libst2205/libst2205.so $RPM_BUILD_ROOT%{_libdir}/libst2205.so.1
ln -s libst2205.so.1 $RPM_BUILD_ROOT%{_libdir}/libst2205.so
install -p -m 644 libst2205/st2205.h $RPM_BUILD_ROOT%{_includedir}


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc LICENSE
%{_libdir}/%{name}.so.1

%files devel
%defattr(-,root,root,-)
%doc %{name}/readme.txt
%{_includedir}/st2205.h
%{_libdir}/%{name}.so

%files tools
%defattr(-,root,root,-)
%{_bindir}/st2205-setpic


%changelog
* Sun Feb 19 2011 Hans de Goede <hdegoede@redhat.com> - 1.4.3-2
- Add missing BuildRequires: gd-devel
- Fix building when libst2205-devel is not already installed

* Sat Feb 19 2011 Hans de Goede <hdegoede@redhat.com> - 1.4.3-1
- Initial Fedora package