File gerbv.spec of Package gerbv

# spec file for package gerbv
# Copyright (c) 2015 SUSE LINUX 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:           gerbv
%define libname lib%{name}
Version:        2.6.1
Release:        0
%define somajor 1
Summary:        Gerber File Viewer that supports the RS-274X Standard
License:        GPL-2.0
Group:          Productivity/Scientific/Electronics
# PATCH-FIX-OPENSUSE gerbv-no-build-time.patch -- fix W: file-contains-date-and-time
Patch1:         gerbv-no-build-time.patch
# PATCH-FIX-UPSTREAM gerbv-2.6.1-no-translation.patch -- disable translation due to missed files
Patch2:         gerbv-2.6.1-no-translation.patch
# PATCH-FIX-UPSTREAM gerbv-fix-install-sh-call.patch -- Fix calling install-sh not from build dir for automake 1.14 
Patch3:         gerbv-fix-install-sh-call.patch
Patch4:         gerbv-2.6.1-undefined-symbols.patch
BuildRequires:  autoconf
BuildRequires:  gtk2-devel
BuildRequires:  libpng-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  po4a
BuildRequires:  update-desktop-files
# Requires:       guile
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Gerber Viewer (gerbv) is a viewer for Gerber files. Gerber files are
generated from PCB CAD system and sent to PCB manufacturers as basis
for the manufacturing process. The standard supported by gerbv is
RS-274X. The basic difference between RS-274D (the old standard) and
RS-274X is basically the addition of apertures in RS-274X. It might be
possible to make an RS-274X file out of an RS-274D file and an
aperture list.

%package -n     %{libname}%{somajor}
Summary:        Gerber File Viewer library
Group:          System/Libraries

%description -n %{libname}%{somajor}
Gerbv library , allows developers to include parsing, editing, exporting,
rendering of Gerber files into other programs.

%package        devel
Summary:        Gerber File Viewer that supports the RS-274X Standard
Group:          Development/Libraries/C and C++
Requires:       %{libname}%{somajor} = %{version}
Requires:       gtk2-devel
Requires:       libpng-devel

%description    devel
This package contains development files for developing applications
that use gerbv library.

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

export LDFLAGS="$LDFLAGS -ldl"
%configure  \
            --disable-static \
            --enable-unit-mm \

make %{?_smp_mflags}

%suse_update_desktop_file -r %{name} Education Engineering
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print

%post -n %{libname}%{somajor} -p /sbin/ldconfig

%postun -n %{libname}%{somajor} -p /sbin/ldconfig

rm -rf %{buildroot}


%files -n %{libname}%{somajor}

%files devel