SFEcairo-dock.spec: update to 2.2.0-4
authorjurikm
Mon, 21 Feb 2011 14:09:39 +0000
changeset 3227 04dcfd2055b9
parent 3226 883d54102513
child 3228 94234c8a1287
SFEcairo-dock.spec: update to 2.2.0-4 SFEcairo-dock-plugins.spec: initial spec
ChangeLog
SFEcairo-dock-plugins.spec
SFEcairo-dock.spec
patches/cairo-dock-01-cmake.diff
patches/cairo-dock-patch01-configure.diff
patches/cairo-dock-patch02-Makefile.diff
patches/cairo-dock-plugins-01-cmake.diff
patches/cairo-dock-plugins-02-solaris.diff
--- a/ChangeLog	Mon Feb 21 14:04:40 2011 +0000
+++ b/ChangeLog	Mon Feb 21 14:09:39 2011 +0000
@@ -1,3 +1,8 @@
+2011-02-21 Milan Jurik <[email protected]>
+
+	* SFEcairo-dock.spec: update to 2.2.0-4
+	* SFEcairo-dock-plugins.spec: initial spec
+
 2011-02-20 Milan Jurik <[email protected]>
 
 	* SFEgtkglext.spec: fix linking error with the latest GTK+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEcairo-dock-plugins.spec	Mon Feb 21 14:09:39 2011 +0000
@@ -0,0 +1,109 @@
+#
+# spec file for package SFEcairo-dock-plugins
+#
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+%define cc_is_gcc 1
+%include base.inc
+
+%define	src_name	cairo-dock-plugins
+%define ver_major	2.2.0
+%define ver_minor	4
+
+Name:           SFEcairo-dock-plugins
+Summary:        cairo-dock plugins
+Version:        %{ver_major}.%{ver_minor}
+Source:		http://launchpad.net/%{src_name}/2.2/%{ver_major}/+download/%{src_name}-%{ver_major}-%{ver_minor}.tar.gz
+Patch1:		cairo-dock-plugins-01-cmake.diff
+Patch2:		cairo-dock-plugins-02-solaris.diff
+SUNW_BaseDir:   %{_basedir}
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%include	default-depend.inc
+Requires: 	SUNWpng
+Requires: 	SUNWdbus
+Requires: 	SUNWgnome-base-libs
+Requires: 	SUNWgnome-wm
+BuildRequires: 	SUNWpng-devel
+BuildRequires: 	SUNWdbus-devel
+BuildRequires: 	SUNWgnome-base-libs-devel
+BuildRequires: 	SUNWgnome-wm-devel
+BuildRequires: 	SUNWcompiz
+BuildRequires:	SFEcmake
+Requires:	SFEcairo-dock
+BuildRequires:	SFEcairo-dock-devel
+Requires:	SFEgtkglext
+BuildRequires:	SFEgtkglext-devel
+Requires:	SUNWlibxklavier
+BuildRequires:	SUNWlibxklavier-devel
+Requires:	SFElibetpan
+BuildRequires:	SFElibetpan-devel
+Requires:	SUNWlibexif
+BuildRequires:	SUNWlibexif-devel
+Requires:	SFEwebkitgtk
+BuildRequires:	SFEwebkitgtk-devel
+
+
+%if %build_l10n
+%package l10n
+Summary:	%{summary} - l10n files
+SUNW_BaseDir:	%{_basedir}
+%include default-depend.inc
+Requires:	%{name}
+%endif
+
+%prep
+%setup -q -n %{src_name}-%{ver_major}-%{ver_minor}
+%patch1 -p1
+%patch2 -p1
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+export CFLAGS="%{optflags}"
+export LDFLAGS="%{_ldflags}"
+export CC=gcc
+export CXX=g++
+
+mkdir build
+cd build
+cmake .. -DCMAKE_INSTALL_PREFIX=/usr
+
+make -j$CPUS
+
+%install
+rm -rf %{buildroot}
+
+cd build
+make install DESTDIR=%{buildroot}
+
+%if %build_l10n
+%else
+rm -rf %{buildroot}%{_datadir}/locale
+%endif
+
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr (-, root, bin)
+%{_libdir}
+%dir %attr(0755, root, sys) %{_datadir}
+%{_datadir}/cairo-dock
+
+%if %build_l10n
+%files l10n
+%defattr (-, root, bin)
+%dir %attr (0755, root, sys) %{_datadir}
+%attr (-, root, other) %{_datadir}/locale
+%endif
+
+%changelog
+* Mon Feb 21 2011 - Milan Jurik
+- Initial spec
--- a/SFEcairo-dock.spec	Mon Feb 21 14:04:40 2011 +0000
+++ b/SFEcairo-dock.spec	Mon Feb 21 14:09:39 2011 +0000
@@ -5,27 +5,22 @@
 #
 
 %include Solaris.inc
+%define cc_is_gcc 1
+%include base.inc
 
-%if %(pkginfo -q FSWxorg-clientlibs && echo 1 || echo 0)
-# FOX
-%define old_x11 0
-%else
-# Nevada X
-%define old_x11     %(pkgchk -l SUNWxwinc 2>/dev/null | grep compositeproto >/dev/null && echo 0 || echo 1)
-%endif
-
-#%define gnome_2_20  %(pkg-config --atleast-version=2.19.0 libgnome-2.0 && echo 1 || echo 0)
+%define	src_name	cairo-dock
+%define ver_major	2.2.0
+%define ver_minor	4
 
 Name:           SFEcairo-dock
 Summary:        cairo-dock
-Version:        20080408
-Source:		http://public.enst.fr/SFE/SOURCES/cairo-dock-sources-%{version}.tar.gz
-Patch1:		cairo-dock-patch01-configure.diff
-Patch2:		cairo-dock-patch02-Makefile.diff
+Version:        %{ver_major}.%{ver_minor}
+Source:		http://launchpad.net/%{src_name}-core/2.2/%{ver_major}/+download/%{src_name}-%{ver_major}-%{ver_minor}.tar.gz
+URL:		glx-dock.org
+Patch1:		cairo-dock-01-cmake.diff
 SUNW_BaseDir:   %{_basedir}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %include	default-depend.inc
-#Requires:	%name-root
 Requires: 	SUNWpng
 Requires: 	SUNWdbus
 Requires: 	SUNWgnome-base-libs
@@ -35,18 +30,11 @@
 BuildRequires: 	SUNWgnome-base-libs-devel
 BuildRequires: 	SUNWgnome-wm-devel
 BuildRequires: 	SUNWcompiz
-BuildRequires: 	CBEgettext
-# TODO require at least a 3D desktop
-## TODO bug in /usr/share/aclocal/dirlist must be :
-#/opt/dtbld/share/aclocal
-#/usr/sfw/share/aclocal
+Requires:	SFEgtkglext
+BuildRequires:	SFEgtkglext-devel
+BuildRequires:	SFEcmake
 
 
-#%package root
-#Summary:         %summary - platform dependent files, / filesystem
-#SUNW_BaseDir:            /
-#%include default-depend.inc
-
 %package devel
 Summary:		 %summary - developer files
 SUNW_BaseDir:            %{_basedir}
@@ -62,11 +50,8 @@
 %endif
 
 %prep
-%setup -q -c -n %{name}
-cd cairo-dock
+%setup -q -n %{src_name}-%{ver_major}-%{ver_minor}
 %patch1 -p1
-cd src
-%patch2 -p1
 
 %build
 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
@@ -74,94 +59,47 @@
     CPUS=1
 fi
 
-PROTO_LIB=$RPM_BUILD_DIR/%{name}/usr/X11/lib
-PROTO_INC=$RPM_BUILD_DIR/%{name}/usr/X11/include
-PROTO_PKG=$RPM_BUILD_DIR/%{name}/usr/X11/lib/pkgconfig
-
-export PKG_CONFIG_PATH="$PROTO_PKG"
-export CC=/usr/sfw/bin/gcc
-export LDFLAGS="-L$PROTO_LIB -L/usr/X11/lib -R/usr/X11/lib"
-export CFLAGS=-D__EXTENSIONS__
-
-cd cairo-dock
+export CFLAGS="%{optflags}"
+export LDFLAGS="%{_ldflags}"
+export CC=gcc
+export CXX=g++
 
-rm -f config.* configure configure.lineno intltool-extract intltool-merge intltool-update libtool ltmain.sh Makefile.in Makefile aclocal.m4 install-sh install depcomp missing compile cairo-dock.pc stamp-h1 cairo-dock.conf 
-rm -rf autom4te.cache src/.deps src/.libs src/Makefile src/Makefile.in po/Makefile po/Makefile.in po/*.gmo src/*.o src/*.lo src/*.la
-
-autoreconf -isf 
-
-export CC=/usr/sfw/bin/gcc
-export LDFLAGS="-L$PROTO_LIB -L/usr/X11/lib -L/usr/openwin/lib -R/usr/X11/lib -R/usr/openwin/lib -lX11 -lXext"
-
-/bin/bash ./configure CONFIG_SHELL=/bin/bash --prefix=%{_prefix}		\
-	    --bindir=%{_bindir}         \
-	    --sysconfdir=%{_sysconfdir}	\
-	    --libdir=%{_libdir}         \
-            --includedir=%{_includedir} \
-	    --datadir=%{_datadir}	
+mkdir build
+cd build
+cmake .. -DCMAKE_INSTALL_PREFIX=/usr
 
 make -j$CPUS
 
 %install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+rm -rf %{buildroot}
 
-cd cairo-dock
-make install DESTDIR=$RPM_BUILD_ROOT
-cd ..
-
+cd build
+make install DESTDIR=%{buildroot}
 
 %if %build_l10n
 %else
-rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
+rm -rf %{buildroot}%{_datadir}/locale
 %endif
 
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
 
 %files
 %defattr (-, root, bin)
-%dir %attr (0755, root, bin) %{_bindir}
-%{_bindir}/*
-%dir %attr (0755, root, bin) %{_libdir}
+%{_bindir}
+%{_libdir}/*.so*
 %dir %attr(0755, root, sys) %{_datadir}
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/battery
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/old-square
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/radium
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/radium-fuel
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/rainbow
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/tomato
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/turbo-night
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/turbo-night-dual
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/gauges/turbo-night-fuel
-%{_datadir}/cairo-dock/gauges/*/*
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/themes
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/themes/_default_
-%dir %attr(0755, root, other) %{_datadir}/cairo-dock/themes/_default_/launchers
-%{_datadir}/cairo-dock/themes/*/*/*
-%{_datadir}/cairo-dock/*.conf
-%{_datadir}/cairo-dock/*.png
-%{_datadir}/cairo-dock/*.svg
-%{_datadir}/cairo-dock/readme-default-view
-%{_datadir}/cairo-dock/ChangeLog.txt
-%{_datadir}/cairo-dock/License
-%{_datadir}/cairo-dock/themes/_default_/readme
-%{_datadir}/cairo-dock/themes/_default_/background-snow.svg
-%{_datadir}/cairo-dock/themes/_default_/separateur.svg
-%{_datadir}/cairo-dock/themes/_default_/preview
-%{_datadir}/cairo-dock/themes/_default_/cairo-dock.conf
-
+%dir %attr (0755, root, other) %{_datadir}/applications
+%{_datadir}/applications/*
+%{_datadir}/cairo-dock
+%dir %attr (0755, root, other) %{_datadir}/pixmaps
+%{_datadir}/pixmaps/*
+%{_mandir}
 
 %files devel
 %defattr (-, root, bin)
-%dir %attr (0755, root, bin) %{_includedir}
-%dir %attr (0755, root, bin) %{_includedir}/cairo-dock
-%dir %attr (0755, root, bin) %{_includedir}/cairo-dock/cairo-dock
-%{_includedir}/cairo-dock/*.h
-%{_includedir}/cairo-dock/cairo-dock/*.h
+%{_includedir}
 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
 %{_libdir}/pkgconfig/*
 
@@ -173,6 +111,8 @@
 %endif
 
 %changelog
+* Mon Feb 21 2011 - Milan Jurik
+- update to 2.2.0-4
 * Aug 04 2009 - Gilles Dauphin ( Gilles POINT Dauphin A enst POINT fr)
 - require CBEgettext , SUNWgnu-gettext is not enough.
 * April 22 2008 - Gilles Dauphin ( Gilles POINT Dauphin A enst POINT fr)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cairo-dock-01-cmake.diff	Mon Feb 21 14:09:39 2011 +0000
@@ -0,0 +1,10 @@
+--- cairo-dock-2.2.0-4/CMakeLists.txt	2010-10-02 00:41:55.000000000 +0200
++++ cairo-dock-2.2.0-4-patch/CMakeLists.txt	2011-02-20 14:49:31.423779175 +0100
+@@ -12,7 +12,6 @@
+ project ("cairo-dock")
+ set (VERSION "2.2.0-4")
+ 
+-add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall 
+ if (NOT ${CMAKE_BUILD_TYPE})
+ 	add_definitions (-O3)
+ endif()
--- a/patches/cairo-dock-patch01-configure.diff	Mon Feb 21 14:04:40 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
---- ./configure.ac.orig	2008-04-08 02:04:02.000000000 +0200
-+++ ./configure.ac	2008-04-21 16:46:19.018277000 +0200
-@@ -37,8 +37,9 @@
- AM_CONDITIONAL(COMPIL_WITH_GLITZ, test x$enable_glitz = xyes)
- 
- 
--PKG_CHECK_MODULES(PACKAGE, "gtk+-2.0 gthread-2.0 cairo librsvg-2.0 glitz dbus-1 dbus-glib-1 libxml-2.0")
--PKG_CHECK_MODULES(GLITZ, "glitz-glx")
-+PKG_CHECK_MODULES(PACKAGE, "gtk+-2.0 gthread-2.0 cairo librsvg-2.0 dbus-1 dbus-glib-1 libxml-2.0")
-+#PKG_CHECK_MODULES(PACKAGE, "gtk+-2.0 gthread-2.0 cairo librsvg-2.0 glitz dbus-1 dbus-glib-1 libxml-2.0")
-+#PKG_CHECK_MODULES(GLITZ, "glitz-glx")
- 
- AC_CONFIG_FILES([Makefile
- 		cairo-dock.pc
--- a/patches/cairo-dock-patch02-Makefile.diff	Mon Feb 21 14:04:40 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
---- src/Makefile.am.orig	2008-04-22 14:40:20.191601000 +0200
-+++ src/Makefile.am	2008-04-22 14:40:57.970125000 +0200
-@@ -39,9 +39,6 @@
- 	-Wno-unused-parameter
- #	-Wall -Wunreachable-code -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration
- 
--cairo_dock_LDFLAGS = \
--	-Wl,--export-dynamic
--
- cairo_dock_LDADD = \
- 	$(glitz_libs) \
- 	$(PACKAGE_LIBS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cairo-dock-plugins-01-cmake.diff	Mon Feb 21 14:09:39 2011 +0000
@@ -0,0 +1,11 @@
+--- cairo-dock-plugins-2.2.0-4/CMakeLists.txt	2010-10-02 00:42:14.000000000 +0200
++++ cairo-dock-plugins-2.2.0-4-patch/CMakeLists.txt	2011-02-20 16:48:42.822850929 +0100
+@@ -12,7 +12,7 @@
+ project ("cairo-dock-plugins")
+ set (VERSION "2.2.0-4")
+ 
+-add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall
++add_definitions (-std=c99)
+ if (NOT ${CMAKE_BUILD_TYPE})
+ 	add_definitions (-O3)
+ endif()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cairo-dock-plugins-02-solaris.diff	Mon Feb 21 14:09:39 2011 +0000
@@ -0,0 +1,102 @@
+--- cairo-dock-plugins-2.2.0-4/GMenu/src/applet-run-dialog.c	2010-10-02 00:42:14.000000000 +0200
++++ cairo-dock-plugins-2.2.0-4-patch/GMenu/src/applet-run-dialog.c	2011-02-20 17:02:37.663012082 +0100
+@@ -62,11 +62,7 @@
+ 		
+ 		suffix = NULL;
+ 		if (
+-		/* don't use g_file_test at first so we don't stat() */
+-		    dent->d_type == DT_DIR ||
+-		    (dent->d_type == DT_LNK &&
+-		     g_file_test (file, G_FILE_TEST_IS_DIR))
+-			//g_file_test (file, G_FILE_TEST_IS_DIR)
++			g_file_test (file, G_FILE_TEST_IS_DIR)
+ 		   )
+ 			suffix = "/";
+ 		
+--- cairo-dock-plugins-2.2.0-4/mail/src/CMakeLists.txt	2010-10-02 00:42:12.000000000 +0200
++++ cairo-dock-plugins-2.2.0-4-patch/mail/src/CMakeLists.txt	2011-02-20 17:07:51.319858503 +0100
+@@ -18,7 +18,7 @@
+ add_library(${PACKAGE_MAIL} SHARED ${cd-mail_LIB_SRCS})
+ 
+ ########### compil ###############
+-add_definitions (-D_POSIX_SOURCE=1 -DHAVE_SSL_SUPPORT=1)
++add_definitions (-D_XOPEN_SOURCE=600 -DHAVE_SSL_SUPPORT=1)
+ add_definitions (-DMY_APPLET_SHARE_DATA_DIR="${maildatadir}")
+ add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg")
+ add_definitions (-DMY_APPLET_CONF_FILE="mail.conf")
+--- cairo-dock-plugins-2.2.0-4/shortcuts/src/applet-disk-usage.c	2010-10-02 00:42:16.000000000 +0200
++++ cairo-dock-plugins-2.2.0-4-patch/shortcuts/src/applet-disk-usage.c	2011-02-20 17:33:12.715264925 +0100
+@@ -17,11 +17,12 @@
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+ 
++#include <stdio.h>
+ #include <string.h>
+-#include <mntent.h>
+ #include <sys/types.h>
+-#include <sys/statfs.h>
+-#include <mntent.h>
++#include <sys/statvfs.h>
++#include <sys/mntent.h>
++#include <sys/mnttab.h>
+ #include <math.h>
+ 
+ #include <cairo-dock.h>
+@@ -32,14 +33,12 @@
+ 
+ void cd_shortcuts_get_fs_stat (const gchar *cDiskURI, CDDiskUsage *pDiskUsage)
+ {
+-	static struct statfs sts;
++	static struct statvfs sts;
+ 	const gchar *cMountPath = (strncmp (cDiskURI, "file://", 7) == 0 ? cDiskURI + 7 : cDiskURI);
+ 	//g_print ("checking device on '%s'...\n", cMountPath);
+ 	
+-	if (statfs (cMountPath, &sts) == 0)
++	if (statvfs (cMountPath, &sts) == 0)
+ 	{
+-		if (pDiskUsage->iType == 0)
+-			pDiskUsage->iType = sts.f_type;
+ 		pDiskUsage->iAvail = (long long)sts.f_bavail * sts.f_bsize;  // Blocs libres pour utilisateurs
+ 		pDiskUsage->iFree  = (long long)sts.f_bfree  * sts.f_bsize;  // Blocs libres
+ 		pDiskUsage->iTotal = (long long)sts.f_blocks * sts.f_bsize;  // Nombre total de blocs
+@@ -160,8 +159,8 @@
+ static void _cd_shortcuts_get_fs_info (const gchar *cDiskURI, GString *sInfo)
+ {
+ 	const gchar *cMountPath = (strncmp (cDiskURI, "file://", 7) == 0 ? cDiskURI + 7 : cDiskURI);
+-	struct mntent *me;
+-	FILE *mtab = setmntent ("/etc/mtab", "r");
++	struct mnttab *me;
++	FILE *mtab = fopen ("/etc/mnttab", "r");
+ 	char *search_path;
+ 	int match;
+ 	char *slash;
+@@ -173,22 +172,20 @@
+ 	}
+ 	
+ 	gchar *cFsInfo = NULL;
+-	while ((me = getmntent (mtab)) != NULL)
++	while (getmntent (mtab, me) == 0)
+ 	{
+-		if (me->mnt_dir && strcmp (me->mnt_dir, cMountPath) == 0)
++		if (me->mnt_mountp && strcmp (me->mnt_mountp, cMountPath) == 0)
+ 		{
+ 			g_string_append_printf (sInfo, "Mount point : %s\nFile system : %s\nDevice : %s\nMount options : %s",
+-				me->mnt_dir,
+-				me->mnt_type,
+-				me->mnt_fsname,
+-				me->mnt_opts);
+-			if (me->mnt_freq != 0)
+-				g_string_append_printf (sInfo, "\nBackup frequency : %d days", me->mnt_freq);
++				me->mnt_mountp,
++				me->mnt_fstype,
++				me->mnt_special,
++				me->mnt_mntopts);
+ 			break ;
+ 		}
+ 	}
+ 	
+-	endmntent (mtab);
++	fclose (mtab);
+ }
+ 
+ gchar *cd_shortcuts_get_disk_info (const gchar *cDiskURI, const gchar *cDiskName)