]> git.pld-linux.org Git - packages/dopewars.git/blobdiff - dopewars.spec
- do not list %{_desktopdir}/* -- dangerous, could list directories unexpectedly
[packages/dopewars.git] / dopewars.spec
index 4b26c429fca5c2446d908f4bd2ef623e17abeb40..d234ba1fab18fddccb48a56a8a1be6d62ad4a010 100644 (file)
@@ -2,29 +2,30 @@
 # TODO: move scores file to /var/games!
 #
 # Conditional build:
-# _without_gtk                         don't build gtk client
-# _without_curses                      don't build curses client
-# _without_sdl                         don't use sdl sound output
-# _without_esd                         don't use esd sound output
+%bcond_without gtk             # don't build GTK+ client
+%bcond_without curses          # don't build curses client
+%bcond_without sdl             # don't use sdl sound output
+%bcond_without esd             # don't use esd sound output
 #
 Summary:       Drug dealing game
 Summary(pl):   Gra polegajĀ±ca na handlowaniu narkotykami
 Name:          dopewars
 Version:       1.5.9
-Release:       1
+Release:       4
 License:       GPL
 Group:         Applications/Games
 Source0:       http://dl.sourceforge.net/dopewars/%{name}-%{version}.tar.gz
 # Source0-md5: 77cdbc59e7550cfda7dfb7f6b7a01050
+Patch0:                %{name}-desktop.patch
 URL:           http://dopewars.sourceforge.net/
-%{!?_without_sdl:BuildRequires:        SDL-devel >= 1.0.0}
-%{!?_without_sdl:BuildRequires:        SDL_mixer-devel}
+%{?with_sdl:BuildRequires:     SDL-devel >= 1.0.0}
+%{?with_sdl:BuildRequires:     SDL_mixer-devel}
 BuildRequires: autoconf
 BuildRequires: automake
-%{!?_without_esd:BuildRequires:        esound-devel >= 0.0.20}
-Buildrequires: glib2-devel >= 2.0.0
-%{!?_without_gtk:BuildRequires:        gtk+2-devel >= 2.0.0}
-%{!?_without_curses:BuildRequires:     ncurses-devel}
+%{?with_esd:BuildRequires:     esound-devel >= 0.0.20}
+BuildRequires: glib2-devel >= 2.0.0
+%{?with_gtk:BuildRequires:     gtk+2-devel >= 1:2.0.0}
+%{?with_curses:BuildRequires:  ncurses-devel}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -56,6 +57,7 @@ polece
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 rm -f missing
@@ -65,22 +67,24 @@ rm -f missing
 %configure \
        --enable-plugins \
        --enable-networking \
-       %{!?_without_esd:--with-esd} \
-       %{!?_without_sdl:--with-sdl} \
-       %{!?_without_curses:--enable-curses-client} \
-       %{!?_without_gtk:--enable-gui-client} \
-       %{!?_without_gtk:--enable-gui-server}
+       %{?with_esd:--with-esd} \
+       %{?with_sdl:--with-sdl} \
+       %{?with_curses:--enable-curses-client} \
+       %{?with_gtk:--enable-gui-client} \
+       %{?with_gtk:--enable-gui-server}
 
-%{__make} CFLAGS="%{rpmcflags} -Wall -I/usr/include/ncurses"
+%{__make} \
+       CFLAGS="%{rpmcflags} -Wall -I/usr/include/ncurses"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_applnkdir}/Games
+install -d $RPM_BUILD_ROOT%{_desktopdir}
 
-%{__make} install DESTDIR=${RPM_BUILD_ROOT}
+%{__make} install \
+       DESTDIR=${RPM_BUILD_ROOT}
 
 # I think this could be done somehow prettier
-mv $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Games/dopewars.desktop $RPM_BUILD_ROOT%{_applnkdir}/Games
+mv $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Games/dopewars.desktop $RPM_BUILD_ROOT%{_desktopdir}
 
 rm -f doc/help/Makefile*
 
@@ -96,9 +100,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc ChangeLog LICENCE README doc/{*.html,help}
 %attr(2755,root,games) %{_bindir}/*
-%attr(0660,root,games) %config(noreplace) %verify(not size mtime md5) %{_datadir}/dopewars.sco
+%attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_datadir}/dopewars.sco
 %{_mandir}/man6/*
 %{_libdir}/%{name}
-%{_applnkdir}/Games/*
+%{_desktopdir}/*.desktop
 %{_pixmapsdir}/*
 %{_datadir}/%{name}
This page took 0.100794 seconds and 4 git commands to generate.