rpms/cairo-dock/F-8 cairo-dock.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Fri May 16 16:47:04 UTC 2008


Author: mtasaka

Update of /cvs/extras/rpms/cairo-dock/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20669/F-8

Modified Files:
	.cvsignore sources 
Added Files:
	cairo-dock.spec 
Log Message:
Initial commit


--- NEW FILE cairo-dock.spec ---
%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 <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.5.4-3.date20080506
- Misc cleanup
- Remove template, upstream says this is not needed

* Sun May 11 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 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 <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.5.4-1.date20080506
- 1.5.5.4

* Thu May  1 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.5.3-1.date20080501
- Initial packaging
- remove Ubuntu related themes
- plugin dir is moved to %%_libdir/%%name/plug-in



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/cairo-dock/F-8/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 May 2008 15:36:53 -0000	1.1
+++ .cvsignore	16 May 2008 16:46:17 -0000	1.2
@@ -0,0 +1 @@
+cairo-dock-sources-20080506.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/cairo-dock/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 May 2008 15:36:53 -0000	1.1
+++ sources	16 May 2008 16:46:17 -0000	1.2
@@ -0,0 +1 @@
+9d19e521c993478a14b48f6d103cfcfb  cairo-dock-sources-20080506.tar.bz2




More information about the fedora-extras-commits mailing list