File gtkqq.spec of Package gtkqq
%if 0%{?suse_version}
%define pkgconfig pkg-config
%define sqlite sqlite3
%define sqlite_devel sqlite3-devel
%define gstreamer_devel gstreamer-0_10-devel
%define group Productivity/Networking/Instant Messenger
%else
%define pkgconfig pkgconfig
%define sqlite sqlite
%define sqlite_devel sqlite-devel
%define gstreamer_devel gstreamer-devel
%define group Productivity/Networking
%endif
Name: gtkqq
Version: 0.1
Release: 1%{?dist}%{?extra_release}
Summary: A Gtk QQ client
Group: %{group}
License: GPL
URL: https://github.com/kernelhcy/gtkqq
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: %{pkgconfig}
BuildRequires: zlib-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel >= 2.24.0
BuildRequires: %{sqlite_devel} >= 3.7.0
BuildRequires: %{gstreamer_devel} >= 0.10.0
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
Requires: libwebqq = %{version}
%description
GtkQQ is a QQ client. It is written using gtk and based on the webqq protocol.
The webqq protocol is based on the HTTP.
Visit http://web.qq.com to see it.
Maybe GtkQQ is a browser, whick can only visit http://web.qq.com.
I think there is no copyright problem, because I just write a highly custommed
broswer.
%package -n libwebqq
License: GPL
Group: System/Libraries
Requires: gtk2 >= 2.24
Requires: %{sqlite}
Summary: Library for GtkQQ
%description -n libwebqq
GtkQQ is a QQ client. It is written using gtk and based on the webqq protocol.
This packages provides the library required for gtkqq.
%prep
%setup -q -n %{name}-%{version}
%build
./configure --prefix=%{_prefix} --libdir=%{_libdir}
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# buggy, not sure the purpose of it
rm -f %{buildroot}/%{_bindir}/qq
# don't need these files, unless a devel package is added
rm -f %{buildroot}/%{_libdir}/libwebqq.so
rm -f %{buildroot}/%{_libdir}/libwebqq.la
rm -f %{buildroot}/%{_libdir}/libwebqq.a
%if 0%{?suse_version}
%suse_update_desktop_file gtkqq GNOME GTK Network InstantMessaging
%endif
%clean
rm -rf %{buildroot}
%post -n libwebqq -p /sbin/ldconfig
%postun -n libwebqq -p /sbin/ldconfig
%files -n libwebqq
%defattr(-,root,root,-)
%{_libdir}/libwebqq.so.*
%files
%defattr(-,root,root,-)
%{_bindir}/gtkqq
%dir %{_datadir}/gtkqq
%{_datadir}/gtkqq/*
%{_datadir}/applications/gtkqq.desktop
%{_datadir}/pixmaps/gtkqq.png
%changelog
* Sun Jan 15 2012 Lyre <lyre@poetpalace.org> - 0.1-1
- Initial rpm packages.