From 121b6a2c013ffe8e965d9b0dfe75bc7ff996168d Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: May 16 2008 16:46:34 +0000 Subject: Initial commit --- diff --git a/.cvsignore b/.cvsignore index e69de29..633eba9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +cairo-dock-sources-20080506.tar.bz2 diff --git a/cairo-dock.spec b/cairo-dock.spec new file mode 100644 index 0000000..4aada7c --- /dev/null +++ b/cairo-dock.spec @@ -0,0 +1,438 @@ +%define tarballver 20080506 +%define mainver 1.5.5.4 + +%if 0%{?fedora} >= 9 +%define gecko_ver 1.9 +%endif +%if 0%{?fedora} == 8 +%define gecko_ver 1.8.1.14 +%endif + +Name: cairo-dock +Version: %{mainver} +Release: 2.date%{tarballver}%{?dist} +Summary: Light eye-candy fully themable animated dock + +Group: User Interface/Desktops +License: GPLv3+ +URL: http://www.cairo-dock.org/ +Source0: http://download.berlios.de/cairo-dock/%{name}-sources-%{tarballver}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: automake +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: libtool + +# For main package +BuildRequires: dbus-glib-devel +BuildRequires: gtk2-devel +BuildRequires: glitz-glx-devel +BuildRequires: librsvg2-devel +BuildRequires: libxml2-devel +BuildRequires: perl(XML::Parser) + +# For plug-ins +BuildRequires: alsa-lib-devel +BuildRequires: gnome-vfs2-devel +BuildRequires: gnutls-devel +BuildRequires: libgnomeui-devel +BuildRequires: libXxf86vm-devel +BuildRequires: vte-devel + +# For plug-ins-xfce +BuildRequires: Thunar-devel + +# For plug-ins-gecko +BuildRequires: gecko-devel %{?gecko_ver:= %{gecko_ver}} +%if 0%{?fedora} >= 9 +BuildRequires: gecko-devel-unstable +%endif + +%description +An light eye-candy fully themable animated dock for any +Linux desktop. It has a family-likeness with OSX dock, +but with more options. + +%package themes +Summary: Additional themes for %{name} +Group: User Interface/Desktops +Requires: %{name} = %{version}-%{release} + +%description themes +This package contains a set of additional themes for %{name}. + +%package plug-ins +Summary: Plug-ins files for %{name} +Group: User Interface/Desktops +Requires: %{name} = %{version}-%{release} + +%description plug-ins +This package contains plug-ins files for %{name}. + +%package plug-ins-xfce +Summary: Plug-ins files for %{name} related to Xfce +Group: User Interface/Desktops +Requires: %{name} = %{version}-%{release} + +%description plug-ins-xfce +This package contains plug-ins files for %{name} related +to Xfce. + +%package plug-ins-gecko +Summary: Plug-ins files for %{name} related to Gecko +Group: User Interface/Desktops +Requires: %{name} = %{version}-%{release} +Requires: gecko-libs %{?gecko_ver:= %{gecko_ver}} + +%description plug-ins-gecko +This package contains plug-ins files for %{name} related +to Gecko. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries + +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig +Requires: dbus-glib-devel +Requires: gtk2-devel +Requires: glitz-glx-devel +Requires: librsvg2-devel +Requires: libxml2-devel + +%description devel +The %{name}-devel package contains libraries, build data, and header +files for developing applications that use %{name}. + +%prep +%setup -q -c +find . -type d -name \.svn | sort -r | xargs %{__rm} -rf + +# A. main +pushd opt/cairo-dock/trunk/cairo-dock + +# permission +for dir in */ + do + find $dir -type f | xargs %{__chmod} 0644 +done +%{__chmod} 0644 [A-Z]* + +# Makefile issue +touch data/main-dock.conf.in +%{__sed} -i.debuglevel -e '/-O3/d' src/Makefile.am + +# plug-in has arch-dependent files, must be moved under +# %_libdir +%{__sed} -i.plugin \ + -e '/CAIRO_DOCK_MODULES_DIR/s|$(pkgdatadir)/plug-in|%{_libdir}/%{name}/plug-in|' \ + src/Makefile.am + +# pkgconfig .pc file +# (also see above) +%{__sed} -i.plugin \ + -e 's|pluginsdir=.*|pluginsdir=%{_libdir}/%{name}/plug-in|' \ + %{name}.pc.in + +%{__sed} -i.libs \ + -e 's|\(Requires: \).*|\1|' \ + -e 's|@PACKAGE_.*@||' \ + %{name}.pc.in +%{__cat} configure.ac | \ + %{__sed} -n -e 's|^PKG_CHECK_MODULES([A-Z][A-Z]*, "\(.*\)")|\1|p' | \ + while read f + do + %{__sed} -i -e "/Requires:/s|^\(.*\)|\1 $f|" %{name}.pc.in +done + +autoreconf -i -f + +# B. themes +cd ../themes +autoreconf -i -f + +# C. plug-ins +cd ../plug-ins + +# +# Note: +# * gnome-integration requires gio-2.0.pc, which are in F-9+ glib2-devel +# * weblets is gecko related, needs investigating +# * mail plug-ins is GPLv2 only, +# however source codes include "cairo-dock.h", which includes "cairo-dock-log.h", +# which is GPLv3+, which makes license conflict. +# + +# permission +%{__chmod} 0644 Applets.stable +find . -name \*.h -or -name \*.c | xargs %{__chmod} 0644 + +# gnome-integration: needs F-9+ +%if 0%{?fedora} < 9 +%{__rm} -rf gnome-integration/ +%endif + +# mail: license conflict +%{__rm} -rf mail/ + +# template: upstream says this is not needed +%{__rm} -rf template/ + +# weblets +%if 0%{?fedora} < 9 +cd weblets/ +%{__sed} -i.gecko \ + -e 's|mozilla-gtkmozembed|firefox-gtkmozembed|' \ + configure.ac +cd .. +%endif + +for dir in */ + do + cd $dir + %{__sed} -i.error \ + -e 's|-O3|-O2|' \ + -e 's|-Werror\\|\\|' \ + src/Makefile.am + autoreconf -i -f + cd .. +done + +popd # from opt/cairo-dock/trunk/cairo-dock + +%build +status=0 + +# A. main +pushd opt/cairo-dock/trunk/cairo-dock + +%configure +%{__make} %{?_smp_mflags} -k || status=$((status+1)) + +# For plug-ins & themes +export CFLAGS="%optflags -I$(pwd)/src" +export PKG_CONFIG_PATH=$(pwd):${PKG_CONFIG_PATH} + +# B themes +cd ../themes + +%configure +%{__make} %{?_smp_mflags} -k || status=$((status+1)) + +# C plug-ins +cd ../plug-ins +ls -1 -d */ | \ + while read dir + do + FAIL=0 + cd $dir + + # Files to be installed under %%_libdir are all modules + # They are also installed under plugin dir and so all of these + # is unneeded + %configure \ + --libdir=/Trash || FAIL=1 + + # Parallel make fails some times, but it is gerenally fast + # so do parallel make anyway first + %{__make} %{?_smp_mflags} -k || : + %{__make} -k && echo "SUCCESS: $dir" || FAIL=1 + if [ $FAIL -gt 0 ] ; then + echo "FAIL: $dir" + status=$((status+1)) + fi + cd .. + # "while read dir" does not save \$status value.... + echo $status > status.log +done +status=`cat status.log` + +popd # from opt/cairo-dock/trunk/cairo-dock +if [ $status -gt 0 ] ; then exit 1 ; fi + +%install +%{__rm} -rf $RPM_BUILD_ROOT +TOPDIR=$(pwd) + +# A. main +pushd opt/cairo-dock/trunk/cairo-dock +export PKG_CONFIG_PATH=$(pwd):${PKG_CONFIG_PATH} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT \ + INSTALL="%{__install} -p" +%{__chmod} 0755 $RPM_BUILD_ROOT%{_bindir}/*.sh + +# desktop files +desktop-file-install \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --vendor fedora \ + data/%{name}.desktop + +# documents +%{__rm} -rf $TOPDIR/documents/main +%{__mkdir} -p $TOPDIR/documents/main +for f in \ + LICENSE \ + data/ChangeLog.txt \ + doc/HOW-TO__applets.txt \ + doc/dox.config + do + %{__cp} -pr $f $TOPDIR/documents/main/ +done + +%find_lang %{name} +%{__mv} -f %{name}.lang $TOPDIR + +# B. themes +cd ../themes +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT \ + INSTALL="%{__install} -p" + +# clean up +pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/themes +# no... +%{__rm} -rf ./_Ubuntu_/ +popd # from $RPM_BUILD_ROOT + +# C plug-ins +%{__rm} -rf $TOPDIR/{lang-plug-ins,lang-gecko} +%{__mkdir} -p $TOPDIR/{lang-plug-ins,lang-gecko} +cd ../plug-ins +ls -1 -d */ | \ + while read dir + do + cd $dir + %{__make} install \ + DESTDIR=$RPM_BUILD_ROOT \ + INSTALL="%{__install} -p" + + # read GETTEXT_PACKAGE + if [ ! -r po/Makefile.in ] ; then + cd .. + continue + fi + GETTEXT_MO_PACKAGES=`sed -n -e 's|^GETTEXT_PACKAGE = ||p' po/Makefile.in` + case $GETTEXT_MO_PACKAGES in + *weblet* ) + %find_lang $GETTEXT_MO_PACKAGES && \ + %{__mv} -f ${GETTEXT_MO_PACKAGES}.lang \ + $TOPDIR/lang-gecko/ + ;; + * ) + %find_lang $GETTEXT_MO_PACKAGES && \ + %{__mv} -f ${GETTEXT_MO_PACKAGES}.lang \ + $TOPDIR/lang-plug-ins/ + ;; + esac + cd .. +done + +# documents +%{__cp} -p Applets.stable $TOPDIR/documents/main/ + +# clean ups +%{__rm} -rf $RPM_BUILD_ROOT/Trash +cat $TOPDIR/lang-plug-ins/*.lang > $TOPDIR/lang-plug-ins.lang +cat $TOPDIR/lang-gecko/*.lang > $TOPDIR/lang-gecko.lang + +# for debuginfo issue +find $RPM_BUILD_ROOT%{_libdir}/%{name}/plug-in -name \*.so | \ + xargs %{__chmod} 0755 + +popd # from opt/cairo-dock/trunk/cairo-dock + +# final clean up +# remove all unneeded files +pushd $RPM_BUILD_ROOT +%{__rm} -f ./%{_datadir}/%{name}/{ChangeLog.txt,License} + +# just to suppress rpmlint... +for f in \ + `find ./%{_datadir}/%{name} -name \*.desktop` \ + `find . -name \*.conf` + do + echo > $f.tmp + cat $f >> $f.tmp + touch -r $f $f.tmp + %{__mv} -f $f.tmp $f +done + +set +x +for f in .%{_libdir}/%{name}/plug-in/*/* + do + if head -n 1 $f 2>/dev/null | grep -q /bin/ ; then + set -x + %{__chmod} 0755 $f + set +x + fi +done +set -x + +popd # from $RPM_BUILD_ROOT + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc documents/main/* + +%{_bindir}/*%{name}* +%{_datadir}/applications/fedora-%{name}.desktop + +%dir %{_datadir}/%{name}/ +%{_datadir}/%{name}/*.conf +%{_datadir}/%{name}/*.png +%{_datadir}/%{name}/*.svg +%{_datadir}/%{name}/*view +%{_datadir}/%{name}/gauges/ +%dir %{_datadir}/%{name}/themes/ +%{_datadir}/%{name}/themes/_default_/ +# only directory +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/plug-in + +%files themes +%defattr(-,root,root,-) +%{_datadir}/%{name}/themes/_[A-Z]*/ + +%files plug-ins -f lang-plug-ins.lang +%defattr(-,root,root,-) +%{_libdir}/%{name}/plug-in/* +%exclude %{_libdir}/%{name}/plug-in/*weblet* +%exclude %{_libdir}/%{name}/plug-in/*xfce* + +%files plug-ins-xfce +%defattr(-,root,root,-) +%{_libdir}/%{name}/plug-in/*xfce* + +%files plug-ins-gecko -f lang-gecko.lang +%defattr(-,root,root,-) +%{_libdir}/%{name}/plug-in/*weblet* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name}/ +%{_libdir}/pkgconfig/*.pc + +%changelog +* Sat May 17 2008 Mamoru Tasaka - 1.5.5.4-3.date20080506 +- Misc cleanup +- Remove template, upstream says this is not needed + +* Sun May 11 2008 Mamoru Tasaka - 1.5.5.4-2.date20080506 +- Remove mail plug-in for now as there is license conflict +- Enable weblet plug-in + +* Fri May 9 2008 Mamoru Tasaka - 1.5.5.4-1.date20080506 +- 1.5.5.4 + +* Thu May 1 2008 Mamoru Tasaka - 1.5.5.3-1.date20080501 +- Initial packaging +- remove Ubuntu related themes +- plugin dir is moved to %%_libdir/%%name/plug-in + diff --git a/sources b/sources index e69de29..6908d07 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9d19e521c993478a14b48f6d103cfcfb cairo-dock-sources-20080506.tar.bz2