Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release-src > by-pkgid > f465aec0122c7609c7097e52df09d596 > files > 5

ntk-1.3.0-2.mga6.src.rpm

%define _disable_ld_no_undefined 1

Name:           ntk
Version:        1.3.0
Release:        %mkrel 2
Summary:        Non Tool Kit (NTK)
Group:          System/Libraries
License:        LGPLv2+
URL:            http://non.tuxfamily.org/ntk/
# sources from git clone git://git.tuxfamily.org/gitroot/non/fltk.git ntk
Source0:        ntk-1.3.0.tar.gz
# no desktop file in tarball
Source1:        ntk-1.3.0-fluid.desktop
# sent upstream via email
Patch1:         ntk-1.3.0-fsf.patch
Patch2:         ntk-unused-shlib.patch

BuildRequires:  cmake
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xft)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  xprop

%description
%{name} is a fork of the FLTK UI toolkit. It employs cairo support and
other additions not accepted upstream. It is currently used by the non-*
audio suite of programs.


#---------------------------------------------------------------------------

%define lib_major 1
%define libname %mklibname %{name} %{lib_major}

%package -n %{libname}
Summary: Non Tool Kit (NTK) - main library
Group: System/Libraries
Provides: %{name} = %{version}-%{release}

%description -n %{libname}
%{name} is a fork of the FLTK UI toolkit. It employs cairo support and
other additions not accepted upstream. It is currently used by the non-*
audio suite of programs.

%files -n %{libname}
%doc COPYING
%{_libdir}/libntk.so.%{lib_major}{,.*}
%{_libdir}/libntk_gl.so.%{lib_major}{,.*}
%{_libdir}/libntk_images.so.%{lib_major}{,.*}

#---------------------------------------------------------------------------

%define develname %mklibname %{name} -d

%package -n %{develname}
Summary: Non Tool Kit (NTK) - development environment
Group: Development/C
Requires: %{libname} = %{version}
Requires: %{name}-fluid = %{version}
Obsoletes: %{name}-devel < %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}

%description -n %{develname}
Development files for the ntk GUI library

Install libntk-devel if you need to develop NTK applications. You'll
need to install the libntk1 package if you plan to run dynamically
linked applications.

%files -n %{develname}
%{_libdir}/libntk.so
%{_libdir}/libntk_images.so
%{_libdir}/libntk_gl.so
%{_includedir}/ntk
%{_libdir}/pkgconfig/*

#---------------------------------------------------------------------------

%package fluid
Summary: Non Toolkit User Interface Designer
Group: Development/Tools

%description fluid
Non Toolkit User Interface Designer, an interactive GUI designer for %{name}.

%files fluid
%{_datadir}/applications/ntk-fluid.desktop
%{_bindir}/ntk-*

#---------------------------------------------------------------------------

%prep
%setup -q
%autopatch -p1

sed -i -e "s|append_value('C\(.*\)FLAGS', CFLAGS|append_value('C\1FLAGS','%{optflags}'.split(' ')|" \
 wscript

%build
LDFLAGS="%{ldflags}" ./waf -v configure \
  --prefix=%{_prefix} \
  --libdir=%{_libdir} \
  --enable-gl
./waf -v %{?_smp_mflags}

%install
./waf -v install --destdir=%{buildroot}
#install -d -m 0755 %{buildroot}%{_datadir}/applications
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/ntk-fluid.desktop
rm %{buildroot}%{_libdir}/libntk*.a*


%changelog
* Wed May 03 2017 animtim <animtim> 1.3.0-2.mga6
+ Revision: 1098909
- fix and clean the spec
- imported package ntk