Browse Source

updated blockrage-vl.spec

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5594 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 12 years ago
parent
commit
3080a12e3a
1 changed files with 41 additions and 35 deletions
  1. 41 35
      b/blockrage/blockrage-vl.spec

+ 41 - 35
b/blockrage/blockrage-vl.spec

@@ -1,18 +1,15 @@
-%define name blockrage
-%define version 0.2.3
-%define release 1%{?_dist_release}
-
 Summary: Block Rage is a "falling-blocks" arcade game,
 Summary(ja): コラムスみたいなゲーム
-Name: %{name}
-Version: %{version}
-Release: %{release}
-#Source0: %{name}-%{version}.tar.bz2
+Name: blockrage
+Version: 0.2.3
+Release: 2%{?_dist_release}
 Source0: %{name}-%{version}.tar.gz
-License: GNU General Public License
+Source1: blockrage.desktop
+License: GPLv2+
 Group: Applications/Games
 URL: http://blockrage.sourceforge.net/
 
+Requires(post,postun): desktop-file-utils
 Requires: SDL >= 1.2.0
 BuildRequires:  SDL-devel
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -22,50 +19,59 @@ Block Rage is a "falling-blocks" arcade game, inspired by a DOS
 classic. It features a two-player hotseat mode. In the future
 it should also feature nice graphics and sound.
 
-#%desctiption -l ja
-
 
 %prep
-rm -rf ${RPM_BUILD_ROOT}
-
 %setup -q
 
 %build
 ./configure \
-    --bindir=/usr/bin \
-    --sysconfdir=/usr/share/games \
-    --datadir=/usr/share/games \
-    --mandir=%{_mandir}
-make
+    --prefix=%{_prefix} \
+    --bindir=%{_bindir} \
+    --datadir=%{_datadir}/games \
+    --sysconfdir=%{_sysconfdir} \
+    --mandir=%{_mandir} \
+    ;
+%__make %{?_smp_mflags}
 
 %install
-make DESTDIR=${RPM_BUILD_ROOT} install
-mkdir -p ${RPM_BUILD_ROOT}/usr/share/applications
-cat >  ${RPM_BUILD_ROOT}/usr/share/applications/%{name}.desktop <<EOF
-[Desktop Entry]
-Name=Block Rage
-Comment=Block Rage is a "falling-blocks" arcade game.
-TryExec=blockrage
-Exec=/usr/bin/blockrage
-Icon=
-Terminal=0
-Type=Application
-Categories=GNOME;Application;Game
-EOF
+%__rm -rf ${RPM_BUILD_ROOT}
+%__make DESTDIR=${RPM_BUILD_ROOT} install
+
+%__mkdir_p ${RPM_BUILD_ROOT}%{_datadir}/applications
+%__install -m0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications
 
 %clean
-rm -rf ${RPM_BUILD_ROOT}
+%__rm -rf ${RPM_BUILD_ROOT}
+
+%post
+# touch --no-create %{_datadir}/icons/hicolor
+# if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+#   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+# fi 
+%{_bindir}/update-desktop-database --quiet %{_datadir}/applications || :
+
+%postun
+%{_bindir}/update-desktop-database --quiet %{_datadir}/applications
+# touch --no-create %{_datadir}/icons/hicolor
+# if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+#   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+# fi || :
 
 
 %files
 %defattr(-,root,root)
-/usr/share/games/blockrage
-/usr/bin/blockrage
-/usr/share/applications/%{name}.desktop
+%doc COPYING ChangeLog INSTALL.txt KNOWN_BUGS README TODO
+%{_datadir}/games/%{name}
+%{_bindir}/blockrage
+%{_datadir}/applications/%{name}.desktop
 %{_mandir}/man6/blockrage.6.gz
+%{_sysconfdir}/%{name}
 
 
 %changelog
+* Wed Feb  8 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.3-2
+- fixed License tag
+
 * Sat Sep 06 2008 Shu KONNO <owa@bg.wakwak.com> 0.2.3-1vl5
 - applied new versioning policy, spec in utf-8
 - updated man-path to %%{_mandir}