unison/unison.spec

90 lines
3.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package unison
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%if !%opt
# get rid of /usr/lib/rpm/find-debuginfo.sh
# strip kills the bytecode part of ELF binaries
# see also NO_BRP_STRIP_DEBUG in install section
%undefine _build_create_debug
%endif
Name: unison
Version: 2.40.102
Release: 0
Summary: File synchronization tool
License: GPL-3.0+
Group: Productivity/Networking/Other
Url: http://www.cis.upenn.edu/~bcpierce/unison
Source0: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-%{version}.tar.gz
Source1: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-%{version}-manual.html
Source2: %{name}.desktop
Source3: %{name}.png
Patch0: build-fix-EG11.1.patch
BuildRequires: gtk2-devel
BuildRequires: lablgtk2-devel
BuildRequires: ncurses-devel
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Unison is a file synchronization tool for Unix and Windows. It allows
two replicas of a collection of files and directories to be stored on
different hosts (or different disks on the same host), modified
separately, then brought up to date by propagating the changes in each
replica to the other.
%prep
%setup -q
%if 0%{?suse_version} == 01110
%patch -p1
%endif
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
%if %opt
NATIVE=true
%else
NATIVE=false
%endif
make UISTYLE=gtk2 NATIVE=$NATIVE THREADS=true
%install
%if !%opt
# get rid of /usr/lib/rpm/brp-strip-debug
# strip kills the bytecode part of ELF binaries
export NO_BRP_STRIP_DEBUG=true
%endif
install -m 755 -d %{buildroot}/%{_bindir}
install -m 755 %name %{buildroot}%{_bindir}
install -m 755 -d %{buildroot}/%{_prefix}/share/pixmaps
install -m 644 %{SOURCE3} %{buildroot}/%{_prefix}/share/pixmaps
install -m 644 %{SOURCE1} unison-manual.html
%suse_update_desktop_file -i %name Utility SyncUtility
%files
%defattr(-,root,root)
%doc BUGS.txt CONTRIB COPYING NEWS README ROADMAP.txt unison-manual.html
%{_datadir}/applications/*
%{_datadir}/pixmaps/unison.png
%{_bindir}/%{name}
%changelog