-%define name GXedit
-%define version 1.23
-%define release 1
-%define prefix /usr
-
-Summary: A multi-function text editor using GTK+
-
-Name: %{name}
-Version: %{version}
-Release: %{release}
-Group: Applications/Editors
-Copyright: Freely distributable
-Url: http://devplanet.fastethernet.net/gxedit.html
-Source: %{name}%{version}.tar.gz
-Source1: GXedit.desktop
-Source2: gxedit-config.h
-
-Patch: gxedit-1.23-makefile.patch
-
-Buildroot: /var/tmp/%{name}-%{version}-%{release}-root
-
-%changelog
-
-* Thu Apr 01 1999 Michael Fulbright <drmike@redhat.com>
-- version 1.23
-
-* Fri Mar 19 1999 Michael Fulbright <drmike@redhat.com>
-- strip binaries
-
-* Sun Mar 06 1999 Michael Fulbright <drmike@redhat.com>
-- version 1.22
-
-* Wed Jan 27 1998 Michael Fulbright <drmike@redhat.com>
-- first attempt at spec file
+Summary: A multi-function text editor using GTK+
+Summary(pl): Wielofunkcyjny edytor tekstu wykorzystuj±cy GTK+
+Name: GXedit
+Version: 1.23
+Release: 3
+Group: X11/Applications/Editors
+Group(pl): X11/Aplikacje/Edytory
+Copyright: Freely distributable
+URL: http://devplanet.fastethernet.net/gxedit.html
+Source0: %{name}%{version}.tar.gz
+Source1: GXedit.desktop
+Patch0: GXedit-config.patch
+Patch1: GXedit-makefile.patch
+BuildPrereq: gtk+-devel >= 1.2.0
+BuildPrereq: glib-devel >= 1.2.0
+BuildPrereq: XFree86-devel
+Buildroot: /tmp/%{name}-%{version}-root
%description
Here is a fast, easy-to-use editor which is both network-
macros and more. GXedit was designed to balance these and
many other features without becoming too bloated.
-You'll need GTK+ to use GXedit.
+%description -l pl
+Oto szybki, ³atwy w obs³udze edytor, który jest nastawiony na pracê w sieci,
+a przy tym bardzo bezpieczny. GXedit jest graficznym edytorem tekstu,
+który dostarcza takie funkcje jak pasek narzêdziowy, sprawdzanie pisowni,
+mo¿liwo¶æ wysy³ania tekstu poczt± elektroniczn±, makra i wiele innych.
+GXedit zosta³ zaprojektowany tak, aby obecno¶æ tych i wielu innych funkcji
+nie wp³ywa³a zbytnio na objêto¶æ samego programu.
%prep
-%setup -n GXedit%{version} -q
-%patch -p1
-cd ${RPM_BUILD_DIR}/%{name}%{version}
-cp %{SOURCE2} ./config.h
+%setup -n %{name}%{version} -q
+%patch0 -p1
+%patch1 -p1
+%build
sed s^/usr/doc/GXedit/^/usr/doc/GXedit-%{version}/^g gxedit.c > gxedit.c.new
mv gxedit.c.new gxedit.c
-%build
-make gxe
+make OPTFLAGS="$RPM_OPT_FLAGS -Wall" gxe
%install
-if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi
-mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
-make SHARE=$RPM_BUILD_ROOT%{prefix}/share INSTALL_DIR=$RPM_BUILD_ROOT%{prefix}/bin/ install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/usr/X11R6/{bin,share/gnome/apps/Applications}
-mkdir -p $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications
-install -c -m 664 %{SOURCE1} $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications
+make install \
+ SHARE=$RPM_BUILD_ROOT/usr/X11R6/share \
+ INSTALL_DIR=$RPM_BUILD_ROOT/usr/X11R6/bin/
-# strip binaries
-strip `file $RPM_BUILD_ROOT/%{prefix}/bin/* | awk -F':' '/executable/ { print $1 }'`
+install %{SOURCE1} $RPM_BUILD_ROOT/usr/X11R6/share/gnome/apps/Applications
-
-%files
-%doc docs/manual.txt docs/manual.ps docs/quickref.txt docs/quickref.ps
-%doc docs/COPYING README CHANGELOG
-%attr(755,root,root) %{prefix}/bin/
-%{prefix}/share/gnome/apps/Applications/GXedit.desktop
-%{prefix}/share/GXedit
+gzip -9nf docs/manual.txt docs/manual.ps docs/quickref.txt docs/quickref.ps \
+ README CHANGELOG docs/DEPENDENCIES
%clean
rm -r $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc {docs/manual.txt,docs/manual.ps,docs/quickref.txt,docs/quickref.ps}.gz
+%doc {README,CHANGELOG,docs/DEPENDENCIES}.gz example.gxeditrc
+
+%attr(755,root,root) /usr/X11R6/bin/
+
+/usr/X11R6/share/gnome/apps/Applications/GXedit.desktop
+/usr/X11R6/share/GXedit
+
+%changelog
+* Tue Apr 27 1999 Piotr Czerwiñski <pius@pld.org.pl>
+ [1.23-3]
+- cleaned up sepec file for PLD use,
+- added pl translation,
+- added new GXedit.desktop file with translation modified for es fr no pl pt,
+- added GXedit-config.patch instead of gxedit-config.h,
+- added new GXedit-makefile.patch,
+- recompiled on rpm 3.
+
+* Thu Apr 01 1999 Michael Fulbright <drmike@redhat.com>
+- version 1.23
+
+* Fri Mar 19 1999 Michael Fulbright <drmike@redhat.com>
+- strip binaries
+
+* Sun Mar 06 1999 Michael Fulbright <drmike@redhat.com>
+- version 1.22
+
+* Wed Jan 27 1998 Michael Fulbright <drmike@redhat.com>
+- first attempt at spec file