commit e0e028a6bc1308f8fc754bc3bccc0cccf15d2e21
Author: Jakub Bogusz <>
Date:   Sat Sep 17 07:25:41 2016 +0200

    - convert data on build (Xvfb required for converter splash/"please wait" 

 lgeneral-data-pg.spec | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
diff --git a/lgeneral-data-pg.spec b/lgeneral-data-pg.spec
index 9e71c11..d321df8 100644
--- a/lgeneral-data-pg.spec
+++ b/lgeneral-data-pg.spec
@@ -1,3 +1,7 @@
+# Conditional build:
+%bcond_without convert         # Convert data to LGeneral format
 Summary:       Panzer General game data files for LGeneral game
 Summary(pl.UTF-8):     Pliki danych gry Panzer General dla gry LGeneral
 Name:          lgeneral-data-pg
@@ -10,6 +14,12 @@ Group:               Applications/Games
 # Source0-md5: 40c4be23f60d1dc732aabe13b58fc5e3
+%if %{with convert}
+BuildRequires: lgeneral-tools
+BuildRequires: xorg-xserver-Xvfb
+Requires:      lgeneral >= 1.3
+Obsoletes:     lgeneral-data < 1.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -20,9 +30,33 @@ General. This package contains Panzer General data files for 
the game.
 LGeneral jest turową grą strategiczną zainspirowaną o Panzer General.
 Ten pakiet zawiera pliki z danymi Panzer General dla tej gry.
+%package source
+Summary:       Panzer General game data in original form
+Summary(pl.UTF-8):     Dane gry Panzer General w oryginalnej postaci
+Group:         Applications/Games
+Suggests:      lgeneral-tools
+%description source
+Panzer General game data in original form.
+%description source -l pl.UTF-8
+Dane gry Panzer General w oryginalnej postaci.
 %setup -q -c
+%if %{with convert}
+install -d 
+DISP=$(( (RANDOM % 87) + 31 ))
+/usr/bin/Xvfb :$DISP &
+[ -n "$XVFB_PID" ] || exit 1
+DISPLAY=:$DISP lgc-pg -s pg-data -d lgeneral
+kill $XVFB_PID
 install -d $RPM_BUILD_ROOT%{_datadir}/lgeneral
@@ -30,10 +64,29 @@ install -d $RPM_BUILD_ROOT%{_datadir}/lgeneral
 cp -r pg-data $RPM_BUILD_ROOT%{_datadir}/lgeneral
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/lgeneral/pg-data/README
+%if %{with convert}
+cp -pr lgeneral/* $RPM_BUILD_ROOT%{_datadir}/lgeneral
+%if %{with convert}
 %doc pg-data/README
+%files source
+%doc pg-data/README

---- gitweb:

pld-cvs-commit mailing list

Reply via email to