File nedit.spec of Package nedit

Name:           nedit
Version:        5.5_CVS20121026
Release:        1
License:        GPL-2.0+
Url:            http://www.nedit.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  openmotif-devel update-desktop-files
%if 0%{?suse_version} <= 1010
BuildRequires:	xorg-x11-devel
%endif
BuildRequires:  bison
Group:          Productivity/Editors/Other
Summary:        A GUI text editor
Source0:        %{name}-%{version}-src.tar.bz2
Source1:        %{name}-icon.png
Source2:        %{name}.desktop
Patch1:         %{name}-5.5CVS-makefiles.patch
Patch2:         %{name}-5.5CVS-security.patch
Patch3:         %{name}-5.5CVS-nc-manfix.patch
Patch4:         %{name}-5.5-visfix.patch
Patch5:         %{name}-5.5CVS-utf8.patch

%description
NEdit is a GUI style plain text editor for workstations with the X Window System
and Motif. NEdit provides all of the standard menu, dialog, editing,
mouse support, macro extension language, syntax highlighting,
and a lot other nice features (and extensions for programmers).

%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0

%build
#find -name .cvsignore |xargs rm
#find -name CVS |xargs rm -r
%if 0%{?suse_version} <= 1010
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -L/usr/X11R6/%{_lib}" \
     linux
%endif

%if 0%{?suse_version} > 1010
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" \
     linux
%endif

pushd doc
make all
popd

%install
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
mv source/nc source/nedit-client
install -s -m 755 source/nedit source/nedit-client $RPM_BUILD_ROOT%{_bindir}
gzip doc/*.man
install -m 644 doc/nedit.man.gz $RPM_BUILD_ROOT%{_mandir}/man1/nedit.1x.gz
mv doc/nc.man.gz doc/nedit-client.man.gz
install -m 644 doc/nedit-client.man.gz $RPM_BUILD_ROOT%{_mandir}/man1/nedit-client.1x.gz
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
install -m 644 %{S:1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_datadir}/applications/
%suse_update_desktop_file %name TextEditor

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc doc/nedit.doc README ReleaseNotes
%{_mandir}/*/*
%{_bindir}/*
%{_prefix}/share/applications/*
%{_datadir}/pixmaps/nedit-icon.png

%changelog
openSUSE Build Service is sponsored by