File update-alternatives.spec of Package update-alternatives

# spec file for package update-alternatives
# Copyright (c) 2011 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

# norootforbuild

%define _name update-alternatives

Name:           update-alternatives
%define jpackage-section free
Version:        1.14.19
Release:        30.<RELEASE3>
Summary:        Maintain symbolic links determining default commands
License:        GPLv2+
Group:          System/Management
Source0:        %{_name}-%{version}.tar.bz2
Source1:        update-alternatives-669716.script
Patch0:         %{_name}-suse.patch
Patch1:         %{_name}-suse-man.patch
Patch2:         %{_name}-manual-state.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    no
Requires:       /usr/bin/perl
Requires(post): sed
Requires(post): coreutils

update-alternatives creates, removes, maintains and displays
information about the symbolic links comprising the alternatives
system. It is possible for several programs fulfilling the same or
similar functions to be installed on a single system at the same time.
For example, many systems have several text editors installed at once.
This gives choice to the users of a system, allowing each to use a
different editor, if desired, but makes it difficult for a program to
make a good choice of editor to invoke if the user has not specified a
particular preference.

On SUSE Linux, this functionality is only used for packages that are
part of the JPackage project <>

%setup -q -n %{_name}-%{version}
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2

# Nope.

install -D -p -m 755 \
install -D -p -m 644 update-alternatives.8 \
# Paths hardcoded in script and patch0.
install -d -m 755 $RPM_BUILD_ROOT/etc/alternatives
install -d -m 755 $RPM_BUILD_ROOT/var/lib/rpm/alternatives

install -d -m 0755 %{buildroot}/%{_libexecdir}/%{name}/
install -m 0755 %{SOURCE1} %{buildroot}/%{_libexecdir}/%{name}/javafix


/bin/sh %{_libexecdir}/%{name}/javafix

# Paths hardcoded in script and patch0.

openSUSE Build Service is sponsored by