File openSUSE-build-key.spec of Package openSUSE-build-key

# spec file for package openSUSE-build-key
# Copyright (c) 2014 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

Name:           openSUSE-build-key
BuildRequires:  gpg
Provides:       build-key
Conflicts:      suse-build-key
Requires:       gpg
AutoReqProv:    off
Summary:        The public gpg keys for rpm package signature verification
License:        GPL-2.0+
Group:          System/Packages
Version:        1.0
Release:        0
Source0:        gpg-pubkey-307e3d54-4be01a65.asc
Source1:        gpg-pubkey-3dbdc284-53674dd4.asc
Source98:       security_at_suse_de.asc
Source99:       security_at_suse_de_old.asc
Source100:      dumpsigs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%define keydir  %{_prefix}/lib/rpm/gnupg/keys
PreReq:         sh-utils gpg fileutils mktemp

This package contains the gpg keys that are used to sign the
openSUSE rpm packages. The keys installed here are not actually
used by anything. rpm/zypper use the keys in the rpm db instead.

%setup -qcT

cp %SOURCE98 .
cp %SOURCE99 .

mkdir -p $RPM_BUILD_ROOT%{keydir}
for i in %sources; do
    case "$i" in
	install -m 644 "$i" $RPM_BUILD_ROOT%{keydir}
install -m 755 %{SOURCE100} $RPM_BUILD_ROOT/usr/lib/rpm/gnupg

%doc security_at_suse_de.asc security_at_suse_de_old.asc
%attr(755,root,root) %dir %{_prefix}/lib/rpm/gnupg
%attr(755,root,root) %dir %{keydir}
%attr(755,root,root) %{_prefix}/lib/rpm/gnupg/dumpsigs