LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File graphviz-gvedit.spec of Package graphviz-plugins (Project graphics)

#
# spec file for package graphviz-gvedit
#
# 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/
#


%define mname graphviz

Name:           graphviz-gvedit
Version:        2.36.0
Release:        0
Summary:        Graph editor based on Qt
License:        IPL-1.0
Group:          Productivity/Graphics/Visualization/Graph
Url:            http://www.graphviz.org/
Source:         http://www.graphviz.org/pub/graphviz/ARCHIVE/%{mname}-%{version}.tar.gz
Source2:        graphviz-rpmlintrc
Patch2:         graphviz-fix-pkgIndex.patch
#PATCH-FIX-UPSTREAM There are too many type-punnings in the vmalloc sources
Patch3:         graphviz-no_strict_aliasing.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  freetype2-devel >= 2
BuildRequires:  gcc-c++
BuildRequires:  libXaw-devel
BuildRequires:  libexpat-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtool
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
Requires(pre):  /bin/cat
Requires(pre):  /bin/rm
Recommends:     graphviz = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is the graph editor included with graphviz, packaged
separately to avoid cycles in the build of the graphviz
package.

%prep
%setup -q -n %{mname}-%{version}
%patch2
%patch3
rm -f contrib/gprof2dot.awk

# Fix path in generated man pages
sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/gv_doc_langs.tcl.new && mv tclpkg/gv/gv_doc_langs.tcl.new tclpkg/gv/gv_doc_langs.tcl

%build
autoreconf -fi
WARN_FLAGS="-W -Wall -Wno-unused-parameter -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith"
CFLAGS="%{optflags} $WARN_FLAGS"
%ifarch %ix86 x86_64
CFLAGS="$CFLAGS -ffast-math"
%endif

export CFLAGS="$CFLAGS"
export CPPFLAGS="%{optflags}"
%configure \
      --with-x \
      --with-mylibgd \
      --disable-static \
      --enable-ltdl-install=no \
      --with-ipsepcola \
      --without-ming \
      --disable-io \
      --disable-silent-rules \
      --with-mylibgd=no \
      --with-libgd=no
make %{?_smp_mflags} DESTDIR=%{buildroot}

%install
make install \
	DESTDIR=%{buildroot} \
	docdir=%{buildroot}%{_docdir}/%{mname} \
	pkgconfigdir=%{_libdir}/pkgconfig

find %{buildroot} -type f -name "*.la" -print0 | xargs -0 rm -f

mkdir -p %{buildroot}/%{_docdir}
mkdir -p %{buildroot}%{_datadir}/%{mname}

rm -f %{buildroot}/%{_libdir}/%{mname}/pkgIndex.tcl

cp -a %{buildroot}%{_datadir}/%{mname}/doc __doc
rm -rf %{buildroot}%{_datadir}/%{mname}/doc

rm -rf %{buildroot}%{_libdir}

mv %{buildroot}/%{_mandir}/man1/gvedit.1 /tmp/gvedit.1
rm -f %{buildroot}/%{_mandir}/man1/*
rm -rf %{buildroot}/%{_mandir}/man[37]
mv /tmp/gvedit.1 %{buildroot}/%{_mandir}/man1/gvedit.1

mv %{buildroot}/%{_bindir}/gvedit /tmp/gvedit
rm -f %{buildroot}/%{_bindir}/*
mv /tmp/gvedit %{buildroot}/%{_bindir}/gvedit

rm -rf %{buildroot}%{_datadir}/%{mname}/graphs
rm -rf %{buildroot}%{_datadir}/%{mname}/gvpr
rm -rf %{buildroot}%{_datadir}/%{mname}/lefty
rm -rf %{buildroot}%{_includedir}/%{mname}

%files
%defattr(-,root,root)
%doc COPYING
%attr(755,root,root) %{_bindir}/gvedit
%dir %{_datadir}/%{mname}
%dir %{_datadir}/%{mname}/gvedit
%{_datadir}/%{mname}/gvedit/attrs.txt
%doc %{_mandir}/man1/*.1*

%changelog