]> git.pld-linux.org Git - packages/STonX.git/blobdiff - STonX.spec
- use fontpostinst
[packages/STonX.git] / STonX.spec
index bc60de85f3eb5ef8afcb65e2da863f178c938417..cd7f00142878f78caba3b909c222ca6508b684c4 100644 (file)
@@ -1,12 +1,7 @@
 #
 # Conditional build:
-# _without_svga                without svgalib support
+%bcond_without svga    # without svgalib support
 #
-
-%ifnarch %{ix86} alpha
-%define _without_svga 1
-%endif
-
 %define                tosarchname     tos206us.zip
 %define                tosfilename     Tos206.img
 
@@ -26,19 +21,21 @@ Patch0:             %{name}-nox.patch
 Patch1:                %{name}-svga.patch
 URL:           http://www.complang.tuwien.ac.at/nino/stonx.html
 BuildRequires: XFree86-devel
-%{!?_without_svga:BuildRequires:       svgalib-devel}
 BuildRequires: autoconf
+BuildRequires: rpmbuild(macros) >= 1.268
+%{?with_svga:BuildRequires:    svgalib-devel}
 BuildRequires: unzip
+Requires(post,postun): fontpostinst
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-
 %description
 STonX is a software emulator, which runs on Unix workstations with the
-X Window system%{!?_without_svga: or svgalib}, and emulates an Atari ST computer.
+X Window system%{?with_svga: or svgalib}, and emulates an Atari ST
+computer.
 
 %description -l pl
 STonX jest programowym emulatorem komputera Atari ST, dzia³aj±cym na
-Uniksach z X Window System%{!?_without_svga: lub svgalib}.
+Uniksach z X Window System%{?with_svga: lub svgalib}.
 
 %prep
 %setup -q -a1
@@ -54,7 +51,7 @@ mv -f %{tosfilename} tos.img
 %{__make} \
        OPT="%{rpmcflags}" \
        REGS="%{!?debug:-fomit-frame-pointer}" \
-       %{!?_without_svga:USE_SVGALIB=1}
+       %{?with_svga:USE_SVGALIB=1}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -65,11 +62,11 @@ install stonx tos.img cartridge.img Keysyms $RPM_BUILD_ROOT%{_libdir}/STonX
 gzip -9nf data/*.pcf
 install data/*.pcf.gz $RPM_BUILD_ROOT%{_fontsdir}/misc
 
-cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<EOF
+cat > $RPM_BUILD_ROOT%{_bindir}/stonx <<'EOF'
 #!/bin/sh
 cd %{_libdir}/STonX
 
-%{!?_without_svga:if [ -z "\$DISPLAY" ]; then exec ./stonx -svga ; fi}
+%{?with_svga:if [ -z "$DISPLAY" ]; then exec ./stonx -svga ; fi}
 exec ./stonx
 EOF
 
@@ -77,20 +74,10 @@ EOF
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ -x /usr/X11R6/bin/mkfontdir ]; then
-       (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
-fi
-if [ -f /var/lock/subsys/xfs ]; then
-       /etc/rc.d/init.d/xfs reload
-fi
+fontpostinst misc
 
 %postun
-if [ -x /usr/X11R6/bin/mkfontdir ]; then
-       (cd /usr/share/fonts/misc; /usr/X11R6/bin/mkfontdir)
-fi
-if [ -f /var/lock/subsys/xfs ]; then
-       /etc/rc.d/init.d/xfs reload
-fi
+fontpostinst misc
 
 %files
 %defattr(644,root,root,755)
@@ -100,4 +87,4 @@ fi
 %attr(755,root,root) %{_libdir}/STonX/stonx
 %{_libdir}/STonX/*.img
 %{_libdir}/STonX/Keysyms
-%{_fontsdir}/misc/*
+%{_fontsdir}/misc/*.pcf.gz
This page took 0.055194 seconds and 4 git commands to generate.