compile and ship unison both with gtk and text ui style
parent
ef6baecbd4
commit
8d837debb9
105
unison240.spec
105
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_requires /usr/lib/rpm/ocaml-find-requires.sh
|
||||||
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
|
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
Name: unison%{ver_compat_name}
|
Name: unison%{ver_compat_name}
|
||||||
Version: %{ver_compat}%{ver_noncompat}
|
Version: %{ver_compat}%{ver_noncompat}
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
Summary: Multi-master File synchronization tool
|
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)
|
#Add documentation, already fixed in trunk (upstream)
|
||||||
Patch1: %{name}-missing-documentation.patch
|
Patch1: %{name}-missing-documentation.patch
|
||||||
|
|
||||||
|
# can't make this noarch (rpmbuild fails about unpackaged debug files)
|
||||||
|
# BuildArch: noarch
|
||||||
ExcludeArch: sparc64 s390 s390x
|
ExcludeArch: sparc64 s390 s390x
|
||||||
|
|
||||||
BuildRequires: ocaml
|
BuildRequires: ocaml
|
||||||
BuildRequires: ocaml-lablgtk-devel
|
|
||||||
BuildRequires: desktop-file-utils
|
Requires: %{name}-ui = %{version}-%{release}
|
||||||
# for lablgtk
|
|
||||||
BuildRequires: gtk2-devel
|
|
||||||
|
|
||||||
Requires(posttrans): %{_sbindir}/alternatives
|
Requires(posttrans): %{_sbindir}/alternatives
|
||||||
Requires(postun): %{_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
|
%description
|
||||||
Unison is a multi-master file-synchronization tool. It allows two
|
Unison is a multi-master file-synchronization tool. It allows two
|
||||||
replicas of a collection of files and directories to be stored on
|
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.
|
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
|
%prep
|
||||||
%setup -q -n unison-%{version}
|
%setup -q -n unison-%{version}
|
||||||
|
|
||||||
|
@ -80,7 +108,7 @@ exist if you require a different major version.
|
||||||
cat > %{name}.desktop <<EOF
|
cat > %{name}.desktop <<EOF
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Exec=unison-%{ver_compat}
|
Exec=unison-gtk-%{ver_compat}
|
||||||
Name=Unison File Synchronizer (version %{ver_compat})
|
Name=Unison File Synchronizer (version %{ver_compat})
|
||||||
GenericName=File Synchronizer
|
GenericName=File Synchronizer
|
||||||
Comment=Multi-master File synchronization tool
|
Comment=Multi-master File synchronization tool
|
||||||
|
@ -98,19 +126,31 @@ cp -a %{SOURCE2} unison-manual.html
|
||||||
# MAKEFLAGS=-j<N> breaks the build.
|
# MAKEFLAGS=-j<N> breaks the build.
|
||||||
unset MAKEFLAGS
|
unset MAKEFLAGS
|
||||||
|
|
||||||
|
# we compile 2 versions: gtk2 ui and text ui
|
||||||
make NATIVE=true UISTYLE=gtk2 THREADS=true
|
make NATIVE=true UISTYLE=gtk2 THREADS=true
|
||||||
|
mv unison unison-gtk
|
||||||
|
|
||||||
|
make NATIVE=true UISTYLE=text THREADS=true
|
||||||
|
mv unison unison-text
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
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
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||||
cp -a %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
cp -a %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||||
|
|
||||||
desktop-file-install --dir %{buildroot}%{_datadir}/applications \
|
desktop-file-install --dir %{buildroot}%{_datadir}/applications \
|
||||||
%{name}.desktop
|
%{name}.desktop
|
||||||
|
|
||||||
%posttrans
|
|
||||||
|
%posttrans gtk
|
||||||
alternatives \
|
alternatives \
|
||||||
--install \
|
--install \
|
||||||
%{_bindir}/unison \
|
%{_bindir}/unison \
|
||||||
|
@ -118,23 +158,50 @@ alternatives \
|
||||||
%{_bindir}/unison-%{ver_compat} \
|
%{_bindir}/unison-%{ver_compat} \
|
||||||
%{ver_priority}
|
%{ver_priority}
|
||||||
|
|
||||||
|
%postun gtk
|
||||||
%postun
|
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
alternatives --remove unison \
|
alternatives --remove unison \
|
||||||
%{_bindir}/unison-%{ver_compat}
|
%{_bindir}/unison-%{ver_compat}
|
||||||
fi
|
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
|
%files
|
||||||
%doc COPYING NEWS README unison-manual.html
|
%doc COPYING NEWS README unison-manual.html
|
||||||
|
|
||||||
|
|
||||||
|
%files gtk
|
||||||
|
%{_bindir}/unison-gtk-%{ver_compat}
|
||||||
%{_bindir}/unison-%{ver_compat}
|
%{_bindir}/unison-%{ver_compat}
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/pixmaps/%{name}.png
|
%{_datadir}/pixmaps/%{name}.png
|
||||||
|
|
||||||
|
|
||||||
|
%files text
|
||||||
|
%{_bindir}/unison-text-%{ver_compat}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 09 2013 Gregor Tätzner <brummbq@fedoraproject.org> - 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 <rel-eng@lists.fedoraproject.org> - 2.40.102-3
|
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.40.102-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue