LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File rpmdevtools.spec of Package rpmdevtools (Project home:ecsos)

# spec file for package rpmdevtools
# 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 emacs_sitestart_d %{_datadir}/emacs/site-lisp

Name:           rpmdevtools
Version:        8.3
Release:        0
# rpmdev-setuptree is GPL-2.0, everything else GPL-2.0+
License:        GPL-2.0 and GPL-2.0+
Summary:        RPM Development Tools
Url:            https://fedorahosted.org/rpmdevtools/
Group:          Development/Tools/Other
Source0:        https://fedorahosted.org/released/rpmdevtools/%{name}/%{name}-%{version}.tar.xz
Source1:        skeleton
Source2:        %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE suse-specfile.patch -- Apply fix to comply to http://en.opensuse.org/openSUSE:Specfile_guidelines
Patch0:         suse-specfile.patch
Patch1:         dont-drop-Groups.patch
BuildRequires:  help2man
BuildRequires:  rpm-python
BuildRequires:  xz
# Minimal RPM build requirements
%if 0%{?sles_version}
Requires:       sled-release
%else 0%{?suse_version}
Requires:	openSUSE-release
# Additionally required for tool operations
Requires:       cpio
Requires:       curl
Requires:       fakeroot
Requires:       python
Requires:       rpm-python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This package contains scripts and (X)Emacs support files to aid in
development of RPM packages.
rpmdev-setuptree    Create RPM build tree within user's home directory
rpmdev-diff         Diff contents of two archives
rpmdev-newspec      Creates new .spec from template
rpmdev-rmdevelrpms  Find (and optionally remove) "development" RPMs
rpmdev-checksig     Check package signatures using alternate RPM keyring
rpminfo             Print information about executables and libraries
rpmdev-md5/sha*     Display checksums of all files in an archive file
rpmdev-vercmp       RPM version comparison checker
spectool            Expand and download sources and patches in specfiles
rpmdev-wipetree     Erase all files within dirs created by rpmdev-setuptree
rpmdev-extract      Extract various archives, "tar xvf" style
rpmdev-bumpspec     Bump revision in specfile
...and many more.

%setup -q
%patch0 -p1
%patch1 -p1
cp -a %{SOURCE1} template.init

# Use the "rpmdev-" prefix for some programs that conflict with the ones from Debian devscripts
sed -i "s/annotate-output/rpmdev-annotate-output/g" devscripts/scripts/annotate-output.1
sed -i "s/checkbashisms/rpmdev-checkbashisms/g" devscripts/scripts/checkbashisms.1
sed -i "s/licensecheck/rpmdev-licensecheck/g" devscripts/scripts/licensecheck.pl
sed -i "s/manpage-alert/rpmdev-manpage-alert/g" devscripts/scripts/manpage-alert.sh devscripts/scripts/manpage-alert.1

# Use the "rpmdev-" prefix for spectool that conflicts with Redhat spectool
sed -i "s/spectool/rpmdev-spectool/g" rpmdevtools.bash-completion.in spectool.in

%configure --libdir=%{_prefix}/lib
make %{?_smp_mflags}


mkdir -p %{buildroot}%{emacs_sitestart_d}
ln -s %{_datadir}/rpmdevtools/rpmdev-init.el %{buildroot}%{emacs_sitestart_d}/rpmdev-init.el
#/bin/touch %{buildroot}%{emacs_sitestart_d}/rpmdev-init.elc

# Use the "rpmdev-" prefix for some programs that conflict with the ones from Debian devscripts
mv %{buildroot}%{_bindir}/annotate-output %{buildroot}%{_bindir}/rpmdev-annotate-output
mv %{buildroot}%{_bindir}/checkbashisms %{buildroot}%{_bindir}/rpmdev-checkbashisms
mv %{buildroot}%{_bindir}/licensecheck %{buildroot}%{_bindir}/rpmdev-licensecheck
mv %{buildroot}%{_bindir}/manpage-alert %{buildroot}%{_bindir}/rpmdev-manpage-alert
mv %{buildroot}%{_mandir}/man1/annotate-output.1 %{buildroot}%{_mandir}/man1/rpmdev-annotate-output.1
mv %{buildroot}%{_mandir}/man1/checkbashisms.1 %{buildroot}%{_mandir}/man1/rpmdev-checkbashisms.1
mv %{buildroot}%{_mandir}/man1/licensecheck.1 %{buildroot}%{_mandir}/man1/rpmdev-licensecheck.1
mv %{buildroot}%{_mandir}/man1/manpage-alert.1 %{buildroot}%{_mandir}/man1/rpmdev-manpage-alert.1

# Use the "rpmdev-" prefix for spectool that conflicts with Redhat spectool
mv %{buildroot}%{_bindir}/spectool %{buildroot}%{_bindir}/rpmdev-spectool
mv %{buildroot}%{_mandir}/man1/spectool.1 %{buildroot}%{_mandir}/man1/rpmdev-spectool.1

# Fix rpmlint warning "non-executable-script"
chmod 755 %{buildroot}%{_datadir}/rpmdevtools/{trap.sh,tmpdir.sh}

%config %{_sysconfdir}/bash_completion.d/rpmdevtools.bash-completion
%config(noreplace) %{_sysconfdir}/rpmdevtools/