File gnustep-Gorm.spec of Package gnustep-Gorm

#
# spec file for package gnustep-Gorm
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#


%define  _name  Gorm
Name:           gnustep-Gorm
Version:        @SERVICE@
Release:        0
Summary:        The GNUstep graphical interface builder
License:        GPL-3.0-or-later
Group:          Development/Tools/GUI Builders
URL:            https://github.com/gnustep/apps-gorm
Source:         %{_name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  gcc-objc
BuildRequires:  gnustep-base-devel
BuildRequires:  gnustep-gui-devel
BuildRequires:  gnustep-make
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       gnustep-back

%description
Gorm is an acronym for GNUstep/Graphical Object Relationship Modeler.  
It is a clone of the NeXTstep "Interface Builder" application for GNUstep.
With Gorm, a developer can build an interface very quickly and easily with
no code.

%package -n lib%{_name}
Summary:        Shared libraries of the GNUstep Interface Builder
Group:          System/Libraries

%description -n lib%{_name}
This package contains shared libraries of Gorm (GNUstep/Graphical Object Relationship Modeler).

%package -n lib%{_name}-devel
Summary:        Development files of the GNUstep Interface Builder
Group:          Development/Libraries/Other
Provides:       %{name}-devel = %{version}-%{release}
Requires:       lib%{_name} = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}

%description -n lib%{_name}-devel
This package contains development files of Gorm (GNUstep/Graphical Object Relationship Modeler).

%package -n libInterfaceBuilder
Summary:        Shared libraries of the GNUstep Interface Builder
Group:          System/Libraries

%description -n libInterfaceBuilder
This package contains shared libraries of InterfaceBuilder.

%prep
%setup -q -n %{_name}-%{version}

%build
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
make %{?_smp_mflags}

%install
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
%make_install GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
chmod a-x %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/%{_name}.desktop
%fdupes -s %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/
sed -i 's|usr/local|usr|' %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/%{_name}.desktop
install -Dm 0644 %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/%{_name}.desktop \
    %{buildroot}%{_datadir}/applications/%{_name}.desktop
%if %{defined suse_version}
%suse_update_desktop_file -r -N "%{_name}" -G "Object Relationship Modeller" %{_name} X-GNUstep Development GUIDesigner
%endif


%fdupes -s %{buildroot}

%post -n lib%{_name} -p /sbin/ldconfig
%postun -n lib%{_name} -p /sbin/ldconfig
%post -n libInterfaceBuilder -p /sbin/ldconfig
%postun -n libInterfaceBuilder -p /sbin/ldconfig

%files
%doc Documentation/ANNOUNCE ChangeLog Documentation/NEWS README.md Version
%{_bindir}/%{_name}
%{_bindir}/gormtool
%{_datadir}/applications/%{_name}.desktop
%{_libdir}/GNUstep
%license COPYING

%files -n lib%{_name}
%{_libdir}/lib%{_name}*.so.*

%files -n libInterfaceBuilder
%{_libdir}/libInterfaceBuilder*.so.*

%files -n lib%{_name}-devel
%{_includedir}/%{_name}*
%{_includedir}/InterfaceBuilder
%{_libdir}/lib%{_name}*.so
%{_libdir}/libInterfaceBuilder.so

%changelog
openSUSE Build Service is sponsored by