[xfe] initial commit

Mamoru Tasaka mtasaka at fedoraproject.org
Wed May 8 13:52:10 UTC 2013


commit d969538e092b440e1b301648ac821f2cef7acadc
Author: Mamoru TASAKA <mtasaka at fedoraproject.org>
Date:   Wed May 8 22:52:05 2013 +0900

    initial commit

 .gitignore                      |    1 +
 sources                         |    1 +
 xfe-1.34-use-system-libsn.patch |  130 +++++++++++++++++++++++++++++++++++++
 xfe.spec                        |  136 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 268 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ff9983f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/xfe-1.34.tar.gz
diff --git a/sources b/sources
index e69de29..e0c3324 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+36d0a590d95742eb59d8128a9a7a35b4  xfe-1.34.tar.gz
diff --git a/xfe-1.34-use-system-libsn.patch b/xfe-1.34-use-system-libsn.patch
new file mode 100644
index 0000000..be037a2
--- /dev/null
+++ b/xfe-1.34-use-system-libsn.patch
@@ -0,0 +1,130 @@
+--- xfe-1.34/configure.ac.syssn	2013-02-07 17:49:40.000000000 +0900
++++ xfe-1.34/configure.ac	2013-05-04 17:07:43.000000000 +0900
+@@ -165,11 +165,16 @@
+ AC_MSG_RESULT([$enable_sn])
+ AC_SUBST(STARTUPNOTIFY,false)
+ if test "x$enable_sn" != "xno"; then
+-	CXXFLAGS="${CXXFLAGS} -DSTARTUP_NOTIFICATION"
+-	AC_SUBST(STARTUPNOTIFY,true)
+-	enable_sn=yes
++	AC_CHECK_PROGS(pkg_config,pkg-config,)
++	if test -n "$pkg_config"; then
++		PKG_CHECK_MODULES(LIBSN, libstartup-notification-1.0)
++		CXXFLAGS="${CXXFLAGS} -DSTARTUP_NOTIFICATION -DSN_API_NOT_YET_FROZEN"
++		AC_SUBST(STARTUPNOTIFY,true)
++		enable_sn=yes
++	fi
+ fi
+ AM_CONDITIONAL(STARTUPNOTIFY, [test x$enable_sn = xyes])
++AC_SUBST(LIBSN_LIBS)
+ 
+ 
+ # Building for debugging
+--- xfe-1.34/src/Makefile.am.syssn	2013-02-07 17:48:39.000000000 +0900
++++ xfe-1.34/src/Makefile.am	2013-05-04 17:13:07.000000000 +0900
+@@ -40,18 +40,7 @@
+ 			  XFileExplorer.cpp \
+               main.cpp
+ 
+-if STARTUPNOTIFY
+-xfe_SOURCES += ../libsn/sn-common.c  \
+-              ../libsn/sn-launchee.c \
+-              ../libsn/sn-launcher.c \
+-              ../libsn/sn-list.c \
+-              ../libsn/sn-monitor.c \
+-              ../libsn/sn-util.c \
+-              ../libsn/sn-xmessages.c \
+-              ../libsn/sn-xutils.c
+-endif
+-
+-xfe_LDADD = @LIBINTL@ -lutil
++xfe_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
+ 
+ 
+ xfp_SOURCES = ../xvt/command.c \
+@@ -79,18 +68,7 @@
+  			  DirHistBox.cpp \
+               XFilePackage.cpp
+ 
+-if STARTUPNOTIFY
+-xfp_SOURCES += ../libsn/sn-common.c  \
+-              ../libsn/sn-launchee.c \
+-              ../libsn/sn-launcher.c \
+-              ../libsn/sn-list.c \
+-              ../libsn/sn-monitor.c \
+-              ../libsn/sn-util.c \
+-              ../libsn/sn-xmessages.c \
+-              ../libsn/sn-xutils.c
+-endif
+-
+-xfp_LDADD = @LIBINTL@ -lutil
++xfp_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
+ 
+ 
+ xfv_SOURCES = ../xvt/command.c \
+@@ -120,18 +98,7 @@
+ 			  FontDialog.cpp \
+               XFileView.cpp
+ 
+-if STARTUPNOTIFY
+-xfv_SOURCES += ../libsn/sn-common.c  \
+-              ../libsn/sn-launchee.c \
+-              ../libsn/sn-launcher.c \
+-              ../libsn/sn-list.c \
+-              ../libsn/sn-monitor.c \
+-              ../libsn/sn-util.c \
+-              ../libsn/sn-xmessages.c \
+-              ../libsn/sn-xutils.c
+-endif
+-
+-xfv_LDADD = @LIBINTL@ -lutil
++xfv_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
+ 	  
+ 
+ xfw_SOURCES = ../xvt/command.c \
+@@ -161,18 +128,7 @@
+ 			  FontDialog.cpp \
+               XFileWrite.cpp
+ 
+-if STARTUPNOTIFY
+-xfw_SOURCES += ../libsn/sn-common.c  \
+-              ../libsn/sn-launchee.c \
+-              ../libsn/sn-launcher.c \
+-              ../libsn/sn-list.c \
+-              ../libsn/sn-monitor.c \
+-              ../libsn/sn-util.c \
+-              ../libsn/sn-xmessages.c \
+-              ../libsn/sn-xutils.c
+-endif
+-
+-xfw_LDADD = @LIBINTL@ -lutil
++xfw_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
+ 
+ 				
+ xfi_SOURCES = ../xvt/command.c \
+@@ -200,23 +156,12 @@
+  			  PathLinker.cpp \
+               XFileImage.cpp
+ 
+-if STARTUPNOTIFY
+-xfi_SOURCES += ../libsn/sn-common.c  \
+-              ../libsn/sn-launchee.c \
+-              ../libsn/sn-launcher.c \
+-              ../libsn/sn-list.c \
+-              ../libsn/sn-monitor.c \
+-              ../libsn/sn-util.c \
+-              ../libsn/sn-xmessages.c \
+-              ../libsn/sn-xutils.c
+-endif
+-
+-xfi_LDADD = @LIBINTL@ -lutil
++xfi_LDADD = @LIBINTL@ -lutil @LIBSN_LIBS@
+ 
+ 
+ localedir = $(datadir)/locale
+ 
+-AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/intl
++AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/intl @LIBSN_CFLAGS@
+ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+ 
+ EXTRA_DIST =  ../libsn/sn-common.h	\
diff --git a/xfe.spec b/xfe.spec
new file mode 100644
index 0000000..cd4322e
--- /dev/null
+++ b/xfe.spec
@@ -0,0 +1,136 @@
+Name:		xfe
+Version:	1.34
+Release:	2%{?dist}
+Summary:	X File Explorer File Manager
+
+License:	GPLv2+
+URL:		http://roland65.free.fr/xfe/
+Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+# Use system-wide startup-notification: need discuss with upstream
+Patch0:	xfe-1.34-use-system-libsn.patch
+
+BuildRequires:	desktop-file-utils
+BuildRequires:	fox-devel
+BuildRequires:	freetype-devel
+BuildRequires:	gettext
+BuildRequires:	intltool
+BuildRequires:	libpng-devel
+BuildRequires:	libX11-devel
+BuildRequires:	libXft-devel
+BuildRequires:	startup-notification-devel
+# Patch0
+BuildRequires:	autoconf
+BuildRequires:	automake
+
+%description
+X File Explorer (xfe) is a lightweight file manager for X11, 
+written using the FOX toolkit.
+
+%package	theme
+Summary:	Extra theme files for %{name}
+Requires:	%{name} = %{version}-%{release}
+BuildArch:	noarch
+
+%description	theme
+This package contains extra theme files for %{name}.
+
+%prep
+%setup -q
+%patch0 -p1 -b .syssn
+
+for f in \
+	ChangeLog
+do
+	mv $f{,.iso}
+	iconv -f ISO-8859-1 -t UTF-8 -o $f{,.iso}
+	touch -r $f{.iso,}
+	rm -f $f.iso
+done
+
+# Patch0
+autoreconf -fi
+rm -rf libsn
+
+%build
+%configure \
+	--bindir=%{_libexecdir}/%{name}
+make %{?_smp_mflags}
+
+%install
+%make_install \
+	INSTALL="install -p"
+
+%find_lang %{name}
+
+# Tweak too generic and short names
+mkdir -p %{buildroot}%{_datadir}/%{name}/pixmaps
+mkdir -p %{buildroot}%{_bindir}
+for suffix in \
+	i e p v w
+do
+	cat > %{buildroot}%{_bindir}/xfe-xf${suffix} <<EOF
+#!/bin/sh
+export PATH=%{_libexecdir}/%{name}:\$PATH
+exec xf${suffix} \$@
+EOF
+	chmod 0755 %{buildroot}%{_bindir}/xfe-xf${suffix}
+
+	mv %{buildroot}%{_datadir}/pixmaps/xf${suffix}.{png,xpm} \
+		%{buildroot}%{_datadir}/%{name}/pixmaps/
+	mv %{buildroot}%{_datadir}/applications/{,xfe-}xf${suffix}.desktop
+	# Modify desktop file
+	sed -i \
+		-e "\@^Exec=@s|xf${suffix}|xfe-xf${suffix}|" \
+		-e "s|Icon=xf${suffix}|Icon=%{_datadir}/%{name}/pixmaps/xf${suffix}.png|" \
+		%{buildroot}%{_datadir}/applications/xfe-xf${suffix}.desktop
+	desktop-file-validate %{buildroot}%{_datadir}/applications/xfe-xf${suffix}.desktop
+
+	mv %{buildroot}%{_mandir}/man1/{,xfe-}xf${suffix}.1
+done
+rmdir %{buildroot}%{_datadir}/pixmaps/
+
+# Move configuration files
+mkdir %{buildroot}%{_sysconfdir}
+mv %{buildroot}%{_datadir}/%{name}/xferc \
+	%{buildroot}%{_sysconfdir}
+ln -sf %{_sysconfdir}/xferc %{buildroot}%{_datadir}/%{name}/xferc
+
+%post
+update-desktop-database &> /dev/null || :
+
+%postun
+update-desktop-database &> /dev/null || :
+
+%files	-f %{name}.lang
+%doc	AUTHORS
+%doc	BUGS
+%doc	COPYING
+%doc	ChangeLog
+%doc	README
+%doc	TODO
+
+%config(noreplace)	%{_sysconfdir}/xferc
+
+%{_bindir}/xfe-xf*
+%dir	%{_libexecdir}/%{name}
+%{_libexecdir}/%{name}/xf*
+%{_datadir}/applications/xfe-xf*.desktop
+%dir	%{_datadir}/%{name}
+%{_datadir}/%{name}/xferc
+%dir	%{_datadir}/%{name}/icons/
+# xferc defaults to gnomeblue-theme, so let's use this
+%{_datadir}/%{name}/icons/gnome*-theme/
+%{_datadir}/%{name}/pixmaps/
+
+%{_mandir}/man1/xfe-xf*.1*
+
+%files	theme
+%{_datadir}/%{name}/icons/*-theme/
+%exclude	%{_datadir}/%{name}/icons/gnome*-theme/
+
+%changelog
+* Sat May  4 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 1.34-2
+- Try to use system-wide startup-notification
+
+* Tue Apr 30 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 1.34-1
+- Initial packaging


More information about the scm-commits mailing list