LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File yudit.spec of Package yudit (Project home:linux4humans:sle11_software:M17N)

#
# spec file for package yudit
#
# Copyright (c) 2011 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:           yudit
BuildRequires:  autoconf
BuildRequires:  dos2unix
BuildRequires:  xorg-x11-devel
%if %suse_version > 1020
BuildRequires:  fdupes
%endif
%define	fontdir     /usr/share/fonts/truetype
%define	xbindir     /usr/bin
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  openmotif
BuildRequires:  openmotif-devel
BuildRequires:  fontpackages-devel
%reconfigure_fonts_prereq
Version:        2.9.2
Release:        0
Url:            http://www.yudit.org/
Icon:         %{name}.gif
Source0:        http://yudit.org/download/yudit-%{version}.tar.bz2
Source1:        fonts.scale.yudit
Patch0:         yudit-2.4.8-tempfile.patch
Patch1:         yudit-properties.patch
Patch2:         yudit-setlocale.patch
Patch3:         print-preview.patch
Patch7:         yudit-strip.patch
Patch9:         uniprint-catch-bad_alloc-exceptions.patch
# PATCH-FIX-UPSTREAM yudit-2.9.2.patch0.txt dimstar@opensuse.org -- Fix segfault when hunspell is used on expanding line.
Patch10:        yudit-2.9.2.patch0.txt
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Unicode text editor
License:        LGPL-2.1+
Group:          Productivity/Editors/Other

%description
yudit is a unicode package to edit and convert text of different
languages.

%prep
%setup -q
#%patch0 -p1
%patch1 -p1 -b .properties
%patch2 -p1 -b .setlocale
%patch3 -p1 -b .print-preview
%patch7
%patch9 -p1 -b .catch-bad_alloc-exceptions
%patch10 -p1
for i in doc/HOWTO-baybayin.txt COPYING.TXT README.TXT doc/HOWTO-devanagari.txt doc/bidi/yudit.css doc/HOWTO-syntax.txt doc/notinstalled/cl.help
do
    dos2unix $i
done

%build
rm -f config.cache
autoconf
export CC="g++"
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIE"
export LDFLAGS="-pie"
./configure \
	--prefix=%{_usr} \
	--bindir=%{xbindir} \
	--mandir=%{_mandir} \
	--datadir=%{_datadir} \
	--with-freetype-includes=%{_includedir}/freetype \
	--with-freetype-libraries=%{_libdir} \
	%{_target_platform}
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 gnome-yudit.png $RPM_BUILD_ROOT/usr/share/pixmaps/yudit.png
mkdir -p $RPM_BUILD_ROOT%{fontdir}
mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/fonts/yudit.ttf \
   $RPM_BUILD_ROOT%{fontdir}
install -m 644 $RPM_SOURCE_DIR/fonts.scale.yudit \
   $RPM_BUILD_ROOT%{fontdir}
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
cp -a C* FAQ* READM* TOD*  *BUG* $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
cp -a doc $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT/usr/share
%endif

%clean

%reconfigure_fonts_scriptlets

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%config /usr/share/pixmaps/yudit.png
%{xbindir}/*
%dir %{fontdir}/
%{fontdir}/*
%doc %{_mandir}/man1/*
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/config
%config %{_datadir}/%{name}/config/*
%{_datadir}/%{name}/data/
%{_datadir}/%{name}/fonts/
%{_datadir}/%{name}/src/
%{_datadir}/%{name}/doc/
%{_datadir}/%{name}/locale/
%{_datadir}/%{name}/syntax/

%changelog