rpms/mj/devel import.log, NONE, 1.1 mj.spec, NONE, 1.1 remove-non-GPL.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Göran Uddeborg goeran at fedoraproject.org
Sat May 1 15:35:39 UTC 2010


Author: goeran

Update of /cvs/pkgs/rpms/mj/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv17692/devel

Modified Files:
	.cvsignore sources 
Added Files:
	import.log mj.spec remove-non-GPL.sh 
Log Message:
* Sat May  1 2010 Göran Uddeborg <goeran at uddeborg.se>
- Import mj into CVS.




--- NEW FILE import.log ---
mj-1_10-4:HEAD:mj-1.10-4.src.rpm:1272727611


--- NEW FILE mj.spec ---
Name:        mj
Version:     1.10
Release:     4%{?dist}
Summary:     Mah-Jong program with network option
Summary(sv): Mah-Jong-program med nätmöjlighet

Group:       Amusements/Games
License:     GPLv2+
URL:         http://mahjong.julianbradfield.org/
# Upstreams: http://mahjong.julianbradfield.org/Source/%name-%version-src.tar.gz
Source0:     %name-GPL-%version-src.tar.bz2
# The bundled tiles have a non-commercial-use license.  So instead we
# use GPL tiles from kdegames instead.  The solution was suggested by
# Tom 'spot' Callaway in:
# http://lists.fedoraproject.org/pipermail/legal/2010-February/001109.html
# To produce the bundled sources from the upstreams, place them in a directory
# and run the command:
# ./remove-non-GPL.sh %version
Source1:     remove-non-GPL.sh

BuildRequires: perl
BuildRequires: gtk2-devel
BuildRequires: kdegames
BuildRequires: inkscape
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils

%global desktopdir %_datadir/applications
%global icontop %_datadir/icons/hicolor
%global icondir %icontop/32x32/apps

%description
This is the game of Mah-Jong, not be confused with the solitaire
matching game using the same tiles.  It is a set of three programs
which provide a networked Mah-Jong system, together with a computer
player.  Thus the game can be played by four humans, by a human and
three computer players, or any other combination.


%description -l sv
Detta är spelet Mah-Jong, inte att förväxla med det patiensliknande
matchningsspelet som använder samma brickor.  Det är en uppsättning
med tre program som utgör ett nätverksbaserat Mah-Jong-system,
tillsammans med en datorspelare.  Spelet kan alltså spelas av fyra
människor, av en människa och tre datorspelare, eller någon
kombination av de två.


%global tiles /usr/share/kde4/apps/kmahjongglib/tilesets/default.svgz
%global gettile() inkscape --without-gui --export-png=tile.png --export-id=%1 --file=tiles.svg --export-height=37 --export-width=27 --export-background=ivory; convert tile.png -crop 25x35+1+1 %2.xpm;


%prep
%setup -q -n %name-%version-src
# Convert the kdegames tiles to the format of the bundled ones.
mkdir tiles-kdegames
cd tiles-kdegames
# For some reason I can't figure out, inkscape fails to uncompress the svgz
# file when run in a mock chroot.  When I run on the command line it works
# fine.  To work around, I uncompress the svgz file in a separate step.
zcat %tiles > tiles.svg
for suit in "BAMBOO B 9" "CHARACTER C 9" "ROD D 9" "FLOWER F 4" "SEASON S 4"
do  set $suit
    for n in $(seq 1 $3)
    do  %gettile $1_$n $n$2
    done
done
%gettile WIND_1 NW
%gettile WIND_2 SW
%gettile WIND_3 EW
%gettile WIND_4 WW
%gettile DRAGON_1 WD
%gettile DRAGON_2 GD
%gettile DRAGON_3 RD
# Pixmap representing the back of a tile.  Use chocolate3 as a bamboo color.
convert WD.xpm -fill chocolate3 -opaque ivory ./--.xpm
# Pixmap used for programming errors.  Use red.  Should never show up.
convert WD.xpm -fill red -opaque ivory XX.xpm
# The "tongs" are ok according to the README file.
cp -p ../tiles-v1/tong* .


%build
make %{?_smp_mflags} EXTRA_CFLAGS="%optflags" LDLIBS=-lm \
     FALLBACKTILES=./tiles-kdegames
cat << EOF > %name.desktop
[Desktop Entry]
Name=Mah-Jong
GenericName=The game of Mah-Jong
GenericName[sv]=Spelet Mah-Jong
Comment=Play Mah-Jong against the computer or over the network
Comment[sv]=Spela Mah-Jong mot datorn eller över nätet
Exec=mj
Icon=mj
Terminal=false
Type=Application
Categories=Game;
EOF


%install
make install install.man DESTDIR=%buildroot%_prefix/ MANDIR=share/man/man1
mkdir %buildroot%desktopdir
desktop-file-install --dir=%buildroot%desktopdir %name.desktop
mkdir -p %buildroot%icondir
convert icon.ico %buildroot%icondir/%name.png


%post
touch --no-create %icontop &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %icontop &>/dev/null
    gtk-update-icon-cache %icontop &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %icontop &>/dev/null || :


%files
%defattr(-,root,root,-)
%doc ChangeLog CHANGES LICENCE README rules.txt use.txt
%_bindir/*
%_mandir/man1/*
%desktopdir/%name.desktop
%icondir/%name.png


%changelog
* Thu Apr 22 2010 Göran Uddeborg <goeran at uddeborg.se> 1.10-4
- Remove non-free tile images from the upstreams tar file.

* Mon Apr 10 2010 Göran Uddeborg <goeran at uddeborg.se> 1.10-3
- Updated according to comments in review.
- Use names instead of hex codes on colors.

* Mon Apr  5 2010 Göran Uddeborg <goeran at uddeborg.se> 1.10-2
- Updated scriptlets to follow current packaging guidelines.

* Tue Mar 30 2010 Göran Uddeborg <goeran at uddeborg.se> 1.10-1
- Packaged mj as an RPM.


--- NEW FILE remove-non-GPL.sh ---
#! /bin/bash
tar --extract --exclude="mj-$1-src/tiles-*/??.xpm" --file=mj-$1-src.tar.gz
tar --create --remove-files --bzip2 --file=mj-GPL-$1-src.tar.bz2 mj-$1-src



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mj/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	29 Apr 2010 02:15:27 -0000	1.1
+++ .cvsignore	1 May 2010 15:35:38 -0000	1.2
@@ -0,0 +1 @@
+mj-GPL-1.10-src.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mj/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	29 Apr 2010 02:15:28 -0000	1.1
+++ sources	1 May 2010 15:35:38 -0000	1.2
@@ -0,0 +1 @@
+b28943e1ae25ba5cad68fe450baed73d  mj-GPL-1.10-src.tar.bz2



More information about the scm-commits mailing list