From ef6baecbd4deb4c6ebcf89218ce95ef2773945cd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 3 Jul 2013 14:08:14 +0100 Subject: [PATCH 1/3] Unset MAKEFLAGS. --- unison240.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unison240.spec b/unison240.spec index b54329b..dbd07e2 100644 --- a/unison240.spec +++ b/unison240.spec @@ -95,6 +95,9 @@ cp -a %{SOURCE2} unison-manual.html %build +# MAKEFLAGS=-j breaks the build. +unset MAKEFLAGS + make NATIVE=true UISTYLE=gtk2 THREADS=true From 8d837debb99a7d3902cfb1877221d8a2d2c23830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20T=C3=A4tzner?= Date: Tue, 10 Sep 2013 17:57:46 +0200 Subject: [PATCH 2/3] compile and ship unison both with gtk and text ui style --- unison240.spec | 107 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 87 insertions(+), 20 deletions(-) diff --git a/unison240.spec b/unison240.spec index dbd07e2..dffefd0 100644 --- a/unison240.spec +++ b/unison240.spec @@ -1,5 +1,5 @@ -%global _use_internal_dependency_generator 0 +%global _use_internal_dependency_generator 1 %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh %global __find_provides /usr/lib/rpm/ocaml-find-provides.sh @@ -28,7 +28,7 @@ Name: unison%{ver_compat_name} Version: %{ver_compat}%{ver_noncompat} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Multi-master File synchronization tool @@ -42,24 +42,17 @@ Source2: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/unison-%{ #Add documentation, already fixed in trunk (upstream) Patch1: %{name}-missing-documentation.patch -ExcludeArch: sparc64 s390 s390x +# can't make this noarch (rpmbuild fails about unpackaged debug files) +# BuildArch: noarch +ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml -BuildRequires: ocaml-lablgtk-devel -BuildRequires: desktop-file-utils -# for lablgtk -BuildRequires: gtk2-devel + +Requires: %{name}-ui = %{version}-%{release} Requires(posttrans): %{_sbindir}/alternatives Requires(postun): %{_sbindir}/alternatives -# Enforce the switch from unison to unisonN.NN -Obsoletes: unison < 2.27.57-3 -# Let users just install "unison" if they want -%if 0%{?provide_unison} -Provides: unison = %{version}-%{release} -%endif - %description Unison is a multi-master file-synchronization tool. It allows two replicas of a collection of files and directories to be stored on @@ -72,6 +65,41 @@ will never be upgraded to a different major version. Other packages exist if you require a different major version. +%package gtk + +Summary: Multi-master File synchronization tool - gtk interface + +BuildRequires: ocaml-lablgtk-devel +BuildRequires: gtk2-devel +BuildRequires: desktop-file-utils + +Requires: %name = %{version}-%{release} + +Provides: %{name}-ui = %{version}-%{release} + +# Enforce the switch from unison to unisonN.NN +Obsoletes: unison < 2.27.57-3 +# Let users just install "unison" if they want +%if 0%{?provide_unison} +Provides: unison = %{version}-%{release} +%endif + +%description gtk +This package provides the graphical version of unison with gtk2 interface. + + +%package text + +Summary: Multi-master File synchronization tool - text interface + +Requires: %name = %{version}-%{release} + +Provides: %{name}-ui = %{version}-%{release} + +%description text +This package provides the textual version of unison without graphical interface. + + %prep %setup -q -n unison-%{version} @@ -80,7 +108,7 @@ exist if you require a different major version. cat > %{name}.desktop < breaks the build. unset MAKEFLAGS +# we compile 2 versions: gtk2 ui and text ui make NATIVE=true UISTYLE=gtk2 THREADS=true +mv unison unison-gtk + +make NATIVE=true UISTYLE=text THREADS=true +mv unison unison-text %install mkdir -p %{buildroot}%{_bindir} -cp -a unison %{buildroot}%{_bindir}/unison-%{ver_compat} + +cp -a unison-gtk %{buildroot}%{_bindir}/unison-gtk-%{ver_compat} +# symlink for compatibility +ln -s %{_bindir}/unison-gtk-%{ver_compat} %{buildroot}%{_bindir}/unison-%{ver_compat} + +cp -a unison-text %{buildroot}%{_bindir}/unison-text-%{ver_compat} + mkdir -p %{buildroot}%{_datadir}/pixmaps cp -a %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png desktop-file-install --dir %{buildroot}%{_datadir}/applications \ %{name}.desktop -%posttrans + +%posttrans gtk alternatives \ --install \ %{_bindir}/unison \ @@ -118,23 +158,50 @@ alternatives \ %{_bindir}/unison-%{ver_compat} \ %{ver_priority} - -%postun +%postun gtk if [ $1 -eq 0 ]; then alternatives --remove unison \ %{_bindir}/unison-%{ver_compat} fi -exit 0 + + +%posttrans text +alternatives \ + --install \ + %{_bindir}/unison \ + unison \ + %{_bindir}/unison-text-%{ver_compat} \ + %{ver_priority} + + +%postun text +if [ $1 -eq 0 ]; then + alternatives --remove unison \ + %{_bindir}/unison-text-%{ver_compat} +fi %files %doc COPYING NEWS README unison-manual.html + + +%files gtk +%{_bindir}/unison-gtk-%{ver_compat} %{_bindir}/unison-%{ver_compat} %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png +%files text +%{_bindir}/unison-text-%{ver_compat} + + %changelog +* Mon Sep 09 2013 Gregor Tätzner - 2.40.102-4 +- ship 2 versions of unison: text only and gtk2 user interface +- move binaries into subpackages +- enable dependency generator + * Fri Feb 15 2013 Fedora Release Engineering - 2.40.102-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 3b08c084b614183b2d7e491009495b7b5875d553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20T=C3=A4tzner?= Date: Tue, 10 Sep 2013 18:10:41 +0200 Subject: [PATCH 3/3] fix bogus date in changelog and remove depgen lines --- unison240.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/unison240.spec b/unison240.spec index dffefd0..24cbb36 100644 --- a/unison240.spec +++ b/unison240.spec @@ -1,8 +1,4 @@ -%global _use_internal_dependency_generator 1 -%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh - # These is the exact upstream version we are packaging %define ver_maj 2 %define ver_min 40 @@ -28,7 +24,7 @@ Name: unison%{ver_compat_name} Version: %{ver_compat}%{ver_noncompat} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Multi-master File synchronization tool @@ -197,6 +193,9 @@ fi %changelog +* Tue Sep 10 2013 Gregor Tätzner - 2.40.102-5 +- fix bogus date in changelog and remove depgen lines + * Mon Sep 09 2013 Gregor Tätzner - 2.40.102-4 - ship 2 versions of unison: text only and gtk2 user interface - move binaries into subpackages @@ -232,7 +231,7 @@ fi - Remove xorg-x11-font-utils Requirement. - Enable THREADS=true. -* Thu Aug 30 2011 Gregor Tätzner - 2.40.63-1 +* Tue Aug 30 2011 Gregor Tätzner - 2.40.63-1 - Version bump. * Sun Jul 26 2009 Fedora Release Engineering - 2.27.57-13 @@ -303,7 +302,7 @@ fi * Mon May 16 2005 Gerard Milmeister - 2.10.2-5 - Patch: http://groups.yahoo.com/group/unison-users/message/3200 -* Fri Apr 7 2005 Michael Schwendt +* Thu Apr 7 2005 Michael Schwendt - rebuilt * Thu Feb 24 2005 Michael Schwendt - 0:2.10.2-2