Jan Engelhardt
29334aee04
fix spatch link. The target did not exist. OBS-URL: https://build.opensuse.org/request/show/263223 OBS-URL: https://build.opensuse.org/package/show/devel:tools/coccinelle?expand=0&rev=37
93 lines
3.1 KiB
RPMSpec
93 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package coccinelle
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: coccinelle
|
|
Version: 1.0.0~rc22
|
|
Release: 0
|
|
Summary: Semantic patch utility
|
|
License: GPL-2.0
|
|
Group: Productivity/Text/Utilities
|
|
Url: http://coccinelle.lip6.fr/
|
|
%define rversion 1.0.0-rc22
|
|
|
|
#Git-Clone: git://github.com/coccinelle/coccinelle
|
|
Source: http://coccinelle.lip6.fr/distrib/%name-%rversion.tgz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: fdupes
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: ocaml >= 3.11
|
|
BuildRequires: ocaml-camlp4-devel >= 3.11
|
|
BuildRequires: ocaml-findlib
|
|
BuildRequires: ocaml-ocamldoc >= 3.11
|
|
BuildRequires: pkg-config
|
|
# Fails to link with PCRE
|
|
#BuildRequires: pkgconfig(libpcre)
|
|
BuildRequires: pkgconfig(python)
|
|
Requires: python-base
|
|
|
|
%description
|
|
Coccinelle is a program matching and transformation engine which
|
|
provides the language SmPL (Semantic Patch Language) for specifying
|
|
desired matches and transformations in C code. Coccinelle was
|
|
initially targeted towards performing collateral evolutions in Linux.
|
|
Such evolutions comprise the changes that are needed in client code
|
|
in response to evolutions in library APIs, and may include
|
|
modifications such as renaming a function, adding a function argument
|
|
whose value is somehow context-dependent, and reorganizing a data
|
|
structure. Beyond collateral evolutions, Coccinelle is successfully
|
|
used (by us and others) for finding and fixing bugs in systems code.
|
|
|
|
%prep
|
|
%setup -qn %name-%rversion
|
|
|
|
%build
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
# "because it is simply not possible to strip ocaml binaries that are built
|
|
# with the -custom option."
|
|
export NO_BRP_STRIP_DEBUG=true
|
|
export NO_DEBUGINFO_STRIP_DEBUG=true
|
|
%define __debug_install_post %{nil}
|
|
: >debugfiles.list
|
|
: >debugsources.list
|
|
|
|
b="%buildroot"
|
|
make install DESTDIR="$b";
|
|
# Remove coccilib, don't have the deps
|
|
rm -Rf "$b/%_datadir/%name"/{commons,globals,ocaml,parsing_c} \
|
|
"$b/%_mandir/man3"/Coccilib*;
|
|
|
|
mkdir -p "$b/%_libdir";
|
|
mv "$b/%_datadir/%name/dllpycaml_stubs.so" "$b/%_libdir/";
|
|
mv "$b/%_datadir/%name/spatch" "$b/%_bindir/spatch.bin"
|
|
ln -s %_bindir/spatch.bin "$b/%_datadir/%name/spatch"
|
|
%fdupes %buildroot/%_prefix
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc authors.txt bugs.txt changes.txt copyright.txt credits.txt
|
|
%doc license.txt readme.txt
|
|
%doc %_mandir/man?/*
|
|
%_bindir/spatch*
|
|
%_libdir/dllpycaml_stubs.so
|
|
%_datadir/%name/
|
|
|
|
%changelog
|