[game-data-packager] 01/01: provide 'license:' shortcut at package level, trim yaml files

Alexandre Detiste detiste-guest at moszumanska.debian.org
Fri Apr 24 21:08:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 9fa32de62b41a93c9998484dbba3bff30249b545
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Fri Apr 24 23:04:00 2015 +0200

    provide 'license:' shortcut at package level, trim yaml files
    
    that sets the usual attributes of license files all at once
---
 data/doom3.yaml                | 11 +++--------
 data/duke3d.yaml               | 11 ++++-------
 data/freespace2.yaml           |  7 +++----
 data/grimfandango.yaml         | 13 ++++---------
 data/hacx.yaml                 |  5 +----
 data/hexen2.yaml               |  4 +---
 data/ja.yaml                   |  7 +------
 data/quake.yaml                | 28 ++++++----------------------
 data/rott.yaml                 | 12 ++----------
 data/rtcw.yaml                 |  5 +----
 data/sfinx.yaml                |  9 ++-------
 data/soltys.yaml               | 14 +++-----------
 data/spear-of-destiny.yaml     |  6 +-----
 data/theme-hospital.yaml       | 16 ++++------------
 data/wolf3d.yaml               | 23 +++++++----------------
 game_data_packager/__init__.py |  9 +++++++++
 16 files changed, 52 insertions(+), 128 deletions(-)

diff --git a/data/doom3.yaml b/data/doom3.yaml
index c26fcb5..83ef498 100644
--- a/data/doom3.yaml
+++ b/data/doom3.yaml
@@ -21,7 +21,7 @@ packages:
     - base/pak006.pk4
     - base/pak007.pk4
     - base/pak008.pk4
-    optional:
+    license:
     - License.txt
 
   doom3-resurrection-data:
@@ -53,12 +53,13 @@ packages:
     - cdoom/Classic Doom 3.url
     - cdoom/description.txt
     - cdoom/docs/shot00002.jpg
-    - cdoom/docs/License.txt
     - cdoom/docs/Readme.txt
     - cdoom/fan_extras/classicdoom_001_1280x1024.jpg
     - cdoom/fan_extras/wallpaper1.jpg
     - cdoom/fan_extras/wallpaper2.jpg
     - cdoom/fan_extras/wallpaper3.jpg
+    license:
+    - cdoom/docs/License.txt
 
   doom3-classic-dev:
     DISABLED:
@@ -802,16 +803,10 @@ files:
       skip: 8736
 
   License.txt:
-    install_to: $docdir
     install_as: license.txt
-    distinctive_name: false
-    license: true
 
   cdoom/docs/License.txt:
-    install_to: $docdir
     install_as: license.txt
-    distinctive_name: false
-    license: true
   cdoom/docs/Readme.txt:
     install_to: $docdir
     install_as: readme.txt
diff --git a/data/duke3d.yaml b/data/duke3d.yaml
index 55820ea..04f206a 100644
--- a/data/duke3d.yaml
+++ b/data/duke3d.yaml
@@ -20,8 +20,9 @@ packages:
     install:
     - duke3d.grp_demo
     optional:
-    - license.txt_demo
     - duke.rts_demo
+    license:
+    - license.txt_demo
 
   duke3d-data:
     install_to: usr/share/games/eduke32
@@ -36,8 +37,9 @@ packages:
     - duke3d.grp
     optional:
     - duke.rts
-    - license.txt
     - manual.pdf
+    license:
+    - license.txt
     
 files:
   3dduke13.zip:
@@ -60,13 +62,8 @@ files:
     look_for: [duke.rts]
     install_as: duke.rts
   license.txt_demo:
-    install_to: $docdir
     install_as: license.txt
-    license: true
 
-  license.txt:
-    install_to: $docdir
-    license: true
   manual.pdf:
     install_to: $docdir
 
diff --git a/data/freespace2.yaml b/data/freespace2.yaml
index ffaaa91..36f2139 100644
--- a/data/freespace2.yaml
+++ b/data/freespace2.yaml
@@ -70,8 +70,10 @@ packages:
     - data/players/hud_2.hcf
     - data/players/hud_3.hcf
 
-    optional:
+    license:
     - GOG_EULA.txt
+
+    optional:
     - MANUAL.PDF
     - ReadMe.txt
     - refcard.pdf
@@ -515,9 +517,6 @@ files:
   stu_fs2.vp_gog:
     look_for: [stu_fs2.vp]
 
-  GOG_EULA.txt:
-    install_to: $docdir
-    license: true
   MANUAL.PDF:
     install_to: $docdir
     install_as: manual.pdf
diff --git a/data/grimfandango.yaml b/data/grimfandango.yaml
index bc70335..8f5cb38 100644
--- a/data/grimfandango.yaml
+++ b/data/grimfandango.yaml
@@ -43,8 +43,9 @@ packages:
     - flower.ico
     - gf.ico
     - grim fandango - manual.pdf
-    - install/license.txt
     - install/readme.txt
+    license:
+    - install/license.txt
 
   grimfandango-demo-data:
     demo_for: grimfandango-data
@@ -61,16 +62,13 @@ packages:
     - Movies/demo_frontend.san
     optional:
     - grim.doc
-    - license.txt
     - readme.txt
+    license:
+    - license.txt
 
 files:
   grim.doc:
     install_to: $docdir
-  license.txt:
-    distinctive_name: false
-    install_to: $docdir
-    license: true
   readme.txt:
     distinctive_name: false
     install_to: $docdir
@@ -78,10 +76,7 @@ files:
   "grim fandango - manual.pdf":
     install_to: $docdir
   install/license.txt:
-    distinctive_name: false
-    install_to: $docdir
     install_as: license.txt
-    license: true
   install/readme.txt:
     distinctive_name: false
     install_to: $docdir
diff --git a/data/hacx.yaml b/data/hacx.yaml
index 826236e..8135a2f 100644
--- a/data/hacx.yaml
+++ b/data/hacx.yaml
@@ -19,7 +19,7 @@ packages:
     install_to: usr/share/games/doom
     install:
     - hacx.wad
-    optional:
+    license:
     - hacx.txt
 
 files:
@@ -33,9 +33,6 @@ files:
     - hacx.wad
     - hacx.txt
   
-  hacx.txt:
-    install_to: $docdir
-    license: true
   hacx.wad_1.1:
     look_for: [hacx.wad]
     unsuitable: HacX 1.2 is required
diff --git a/data/hexen2.yaml b/data/hexen2.yaml
index 9983ef3..8a862ce 100644
--- a/data/hexen2.yaml
+++ b/data/hexen2.yaml
@@ -27,7 +27,7 @@ packages:
     install_to: usr/share/games/hexen2
     install:
     - data1/pak0.pak_demo
-    optional:
+    license:
     - HEXEN II SUBLICENSE.doc
     # Word 6 .doc, can be translated with antiword
 
@@ -86,9 +86,7 @@ files:
 
   HEXEN II SUBLICENSE.doc:
     look_for: [HEXEN II SUBLICENSE.doc, SUBLICENSE.doc]
-    install_to: $docdir
     install_as: hexen_II_sublicense.doc
-    license: true
 
 cksums: |
   1099843119 27750257 data1/pak0.pak_demo
diff --git a/data/ja.yaml b/data/ja.yaml
index 0e77523..6b3312a 100644
--- a/data/ja.yaml
+++ b/data/ja.yaml
@@ -49,7 +49,7 @@ packages:
     - assets0.pk3_demo
     - ui/demo_ingame.txt
     - ui/demo_menus.txt
-    optional:
+    license:
     - license.txt
     symlinks:
       usr/lib/openjk-academy-demo/base/assets0.pk3: usr/share/games/jedi-academy-demo/base/assets0.pk3
@@ -157,11 +157,6 @@ files:
     - ui/demo_ingame.txt
     - ui/demo_menus.txt
 
-  license.txt:
-    install_to: $docdir
-    license: true
-    distinctive_name: false
-
 cksums: |
   _ 195892094 JediAcademyDemo.exe
   _ 2883388   data1.cab
diff --git a/data/quake.yaml b/data/quake.yaml
index 4010ccd..954214f 100644
--- a/data/quake.yaml
+++ b/data/quake.yaml
@@ -33,6 +33,7 @@ packages:
       conflicts: quake-registered
     install:
     - id1/pak0.pak_106
+    license:
     - licinfo.txt_shareware
     - slicnse.txt
     install_to: usr/share/games/quake
@@ -49,7 +50,7 @@ packages:
     install:
     - id1/pak0.pak_106
     - id1/pak1.pak
-    optional:
+    license:
     - comexp.txt_101_cd
     - licinfo.txt_101_cd
     - manual.txt_101_cd
@@ -67,9 +68,10 @@ packages:
     install:
     - hipnotic/pak0.pak
     optional:
-    - license.txt_mp12_cd
     - armagon/manual.htm
     - armagon/manual.txt
+    license:
+    - license.txt_mp12_cd
     install_to: usr/share/games/quake
 
   quake-dissolution:
@@ -83,11 +85,12 @@ packages:
     install:
     - rogue/pak0.pak
     optional:
-    - license.txt_mp12_cd
     - eternity/ctf.htm
     - eternity/ctf.txt
     - eternity/manual.htm
     - eternity/manual.txt
+    license:
+    - license.txt_mp12_cd
     install_to: usr/share/games/quake
 
   quake-music:
@@ -132,27 +135,13 @@ files:
     size: 34257856
 
   licinfo.txt_shareware:
-    distinctive_name: false
     install_as: licinfo.txt
-    install_to: $docdir
-    license: true
 
   licinfo.txt_101_cd:
-    distinctive_name: false
     install_as: licinfo.txt
-    install_to: $docdir
-    license: true
 
   license.txt_mp12_cd:
-    distinctive_name: false
     install_as: license.txt
-    install_to: $docdir
-    license: true
-
-  slicnse.txt:
-    distinctive_name: false
-    install_to: $docdir
-    license: true
 
   manual.txt_101_cd:
     distinctive_name: false
@@ -160,15 +149,10 @@ files:
     install_as: manual.txt
 
   comexp.txt_101_cd:
-    distinctive_name: false
-    install_to: $docdir
     install_as: comexp.txt
 
   rlicnse.txt_101_cd:
-    distinctive_name: false
-    install_to: $docdir
     install_as: rlicnse.txt
-    license: true
 
   armagon/manual.htm:
     install_to: $docdir
diff --git a/data/rott.yaml b/data/rott.yaml
index 6991701..9340982 100644
--- a/data/rott.yaml
+++ b/data/rott.yaml
@@ -28,7 +28,7 @@ packages:
     - HUNTBGIN.RTL
     - HUNTBGIN.WAD
     - REMOTE1.RTS
-    optional:
+    license:
     - VENDOR.DOC
 
   rott-registered-data:
@@ -42,7 +42,7 @@ packages:
     - any_registered_rtc
     - DARKWAR.RTL
     - DARKWAR.WAD
-    optional:
+    license:
     - LICENSE.TXT
 
   rott-extreme-data:
@@ -63,10 +63,6 @@ files:
     - DARKWAR.RTC
     install_as: $alternative
 
-  LICENSE.TXT:
-    install_to: $docdir
-    license: true
-
   1rott13.zip:
     size: 3668139
     download:
@@ -100,10 +96,6 @@ files:
     unpack:
       format: zip
 
-  VENDOR.DOC:
-    install_to: $docdir
-    license: true
-
   DEMO1_3.DMO:
     distinctive_name: false
 
diff --git a/data/rtcw.yaml b/data/rtcw.yaml
index a56eedf..dcac9d1 100644
--- a/data/rtcw.yaml
+++ b/data/rtcw.yaml
@@ -62,6 +62,7 @@ packages:
     optional:
     - main/autoexec.cfg
     - main/rotate.cfg
+    license:
     - license_fr.txt
     - license_en.txt
 
@@ -167,14 +168,10 @@ files:
   license_fr.txt:
     size: 18725
     look_for: [License.txt]
-    install_to: $docdir
-    license: true
 
   license_en.txt:
     size: 15483
     look_for: [License.txt]
-    install_to: $docdir
-    license: true
 
 md5sums: |
   d0c13dcf44a7baa7741af50e09844371  main/autoexec.cfg
diff --git a/data/sfinx.yaml b/data/sfinx.yaml
index c9f9439..9d1075e 100644
--- a/data/sfinx.yaml
+++ b/data/sfinx.yaml
@@ -16,7 +16,7 @@ packages:
     install:
     - vol.cat
     - vol.dat
-    optional:
+    license:
     - license.txt
 
   sfinx-pl-data:
@@ -27,7 +27,7 @@ packages:
     install:
     - vol.cat_pl
     - vol.dat_pl
-    optional:
+    license:
     - license.txt_pl
 
 files:
@@ -39,9 +39,6 @@ files:
     - vol.cat
     - vol.dat
     - license.txt
-  license.txt:
-    install_to: $docdir
-    license: true
 
   sfinx-pl-v1.0.zip:
     download: http://prdownloads.sourceforge.net/scummvm/sfinx-pl-v1.0.zip?download
@@ -59,9 +56,7 @@ files:
     install_as: vol.dat
   license.txt_pl:
     look_for: [license.txt]
-    install_to: $docdir
     install_as: license.txt
-    license: true
 
 cksums: |
   _ 16549117  sfinx-en-v1.1.zip
diff --git a/data/soltys.yaml b/data/soltys.yaml
index 6a05b9d..c17edb5 100644
--- a/data/soltys.yaml
+++ b/data/soltys.yaml
@@ -12,7 +12,7 @@ packages:
     install:
     - vol.cat
     - vol.dat
-    optional:
+    license:
     - license.txt
 
   soltys-pl-data:
@@ -23,7 +23,7 @@ packages:
     install:
     - vol.cat_pl
     - vol.dat_pl
-    optional:
+    license:
     - license.txt_pl
 
   soltys-es-data:
@@ -34,7 +34,7 @@ packages:
     install:
     - vol.cat_es
     - vol.dat_es
-    optional:
+    license:
     - license.txt
     - licencia.txt
 files:
@@ -46,9 +46,6 @@ files:
     - vol.cat
     - vol.dat
     - license.txt
-  license.txt:
-    install_to: $docdir
-    license: true
 
   soltys-pl-v1.0.zip:
     download: http://prdownloads.sourceforge.net/scummvm/soltys-pl-v1.0.zip?download
@@ -65,9 +62,7 @@ files:
     install_as: vol.dat
     look_for: [vol.dat]
   license.txt_pl:
-    install_to: $docdir
     install_as: license.txt
-    license: true
     look_for: [license.txt]
 
   soltys-es-v1.0.zip:
@@ -85,9 +80,6 @@ files:
   vol.dat_es:
     install_as: vol.dat
     look_for: [vol.dat]
-  licencia.txt:
-    install_to: $docdir
-    license: true
 
 cksums: |
   _ 3484518   soltys-en-v1.0.zip
diff --git a/data/spear-of-destiny.yaml b/data/spear-of-destiny.yaml
index e6da1b2..32d6ca5 100644
--- a/data/spear-of-destiny.yaml
+++ b/data/spear-of-destiny.yaml
@@ -41,7 +41,7 @@ packages:
       2382785751 305891  vgagraph.sdm
       3240931844 402     vgahead.sdm
       3002732200 730624  vswap.sdm
-    optional:
+    license:
     - sod.doc
 
   spear-of-destiny-data:
@@ -132,10 +132,6 @@ files:
     unpack:
       format: lha
 
-  sod.doc:
-    install_to: $docdir
-    license: true
-
 cksums: |
   2532954622 6852    sod.doc
 
diff --git a/data/theme-hospital.yaml b/data/theme-hospital.yaml
index a954a8a..92bcb9e 100644
--- a/data/theme-hospital.yaml
+++ b/data/theme-hospital.yaml
@@ -24,6 +24,10 @@ packages:
       url: theme_hospital
     origin:
       path: Theme Hospital
+    license:
+    - gog_eula.txt
+    - eula.txt
+    - en_US_eula.rtf
     optional:
     # documentation
     - EN.pdf
@@ -31,9 +35,6 @@ packages:
     - GE.pdf
     - IT.pdf
     - manual.pdf
-    - gog_eula.txt
-    - eula.txt
-    - en_US_eula.rtf
     # not present in the gog.com copy; judging by their names, they're
     # probably unnecessary?
     - levels/easy00.bak
@@ -897,15 +898,6 @@ files:
     install_to: $docdir
   manual.pdf:
     install_to: $docdir
-  eula.txt:
-    install_to: $docdir
-    license: true
-  gog_eula.txt:
-    install_to: $docdir
-    license: true
-  en_US_eula.rtf:
-    install_to: $docdir
-    license: true
 
   anims/winlevel.smk_demo:
     install_as: anims/winlevel.smk
diff --git a/data/wolf3d.yaml b/data/wolf3d.yaml
index e767b7a..5a6a64e 100644
--- a/data/wolf3d.yaml
+++ b/data/wolf3d.yaml
@@ -22,7 +22,7 @@ packages:
       1729266021 326568 vgagraph.wl1
       3936285452 471    vgahead.wl1
       4022822569 742912 vswap.wl1
-    install:
+    license:
     - vendor.doc
 
   wolf3d-full-v12-data:
@@ -61,8 +61,8 @@ packages:
     - vgagraph.wl6
     - vgahead.wl6
     - vswap.wl6
-    optional:
-    - LICENSE.DOC_wl6a
+    license:
+    - LICENSE.DOC
 
 files:
   # demo
@@ -97,10 +97,6 @@ files:
     unpack:
       format: id-shr-extract
 
-  vendor.doc:
-    install_to: $docdir
-    license: true
-
   # full version v1.2
   w6patc12.zip:
     size: 104052
@@ -208,11 +204,6 @@ files:
     look_for:
     - vswap.wl6
 
-  LICENSE.DOC_wl6a:
-    install_as: LICENSE.DOC
-    install_to: $docdir
-    license: true
-
   # older demos
   AUDIOHED.WL1_1.0:
     look_for: [audiohed.wl1]
@@ -291,7 +282,7 @@ cksums: |
   3380985220 334506  vgagraph.wl6_wl6a
   3071614724 486     vgahead.wl6_wl6a
   #4156874368 1545400 vswap.wl6_wl6a - same as alt
-  1260526910 2606    LICENSE.DOC_wl6a
+  1260526910 2606    LICENSE.DOC
 
   # "Wolfenstein 3D v1.2 full Apogee"
   # run with wolf3sdl-wl6a1
@@ -358,7 +349,7 @@ md5sums: |
   4e96d7b4e89a5b3a4beeebf5d7d87eb7  vgagraph.wl6_wl6a
   a08905e2b0d299b3fad259f90c0efb1a  vgahead.wl6_wl6a
   #a6d901dfb455dfac96db5e4705837cdb  vswap.wl6_wl6a - same as alt
-  8eccd0fe00da18e06227426292f3d863  LICENSE.DOC_wl6a
+  8eccd0fe00da18e06227426292f3d863  LICENSE.DOC
   3bfac1f5de61d8a1a7df949fbde873fc  audiohed.wl6_1.0
   bb228b96fc12f2a658fc8033637ec051  audiot.wl6_1.0
   d159e885f32e2355c6a31eaef350b902  vgadict.wl6_1.0
@@ -411,7 +402,7 @@ sha1sums: |
   7ea4ccb7c446628a528c8f68ebd1fbcb8b5366e6  vgagraph.wl6_wl6a
   c5100bcbaaf2a78fc831f6780089bd3fa46bd9a5  vgahead.wl6_wl6a
   #e1a7cac993e4af7fddef80367090f10a2efa7196  vswap.wl6_wl6a - same as alt
-  cd03e6f036764464eeb29705f67ebd356f26cde9  LICENSE.DOC_wl6a
+  cd03e6f036764464eeb29705f67ebd356f26cde9  LICENSE.DOC
   660a3effb265442f770040aee1d9f2447300767a  audiohed.wl6_1.0
   d2d97546f37d177478c1c8ec10deaebac1e9b534  audiot.wl6_1.0
   33ef9c6082376763eed32484240c3bce128f38f2  vgadict.wl6_1.0
@@ -464,7 +455,7 @@ sha256sums: |
   84adea791e3ab1251312ee159414e48d5114622dc84348cebbac8a1dacb4b41f  vgagraph.wl6_wl6a
   386b56a62ce79cdfa502542b0c9a9bad0d29fab4250edf17e05ee4ac51aa37a8  vgahead.wl6_wl6a
   #49ba24e0b3916732cd065122de4fe6fb6e6a5009c353eafa407c0e3a5a503407  vswap.wl6_wl6a - same as alt
-  578ed140d4a0c32109ceba304bc2aa537e4372459afd90acfe2ec3041b9faf44  LICENSE.DOC_wl6a
+  578ed140d4a0c32109ceba304bc2aa537e4372459afd90acfe2ec3041b9faf44  LICENSE.DOC
   45991892e1a0fabdfecf1d52a3d7b31096e455372f5bb4116789b914f9f3b96f  audiohed.wl6_1.0
   f43f345c8ec5515e97c7782c6e032090a7e8942174b157fd0c8af47cf1d1e834  audiot.wl6_1.0
   ee387050e4d0e894f14c0e06a9174dd7ef28ddd375f3e1102bd83106642641b8  vgadict.wl6_1.0
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 6f644c8..65bdd09 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -811,6 +811,15 @@ class GameData(object):
                 f = self._ensure_file(filename)
                 package.optional.add(filename)
 
+        if 'license' in d:
+            assert isinstance(d['license'], list), package.name
+            for filename in d['license']:
+                f = self._ensure_file(filename)
+                f.license = True
+                f.install_to = '$docdir'
+                f.distinctive_name = False
+                package.optional.add(filename)
+
         if 'install_files_from_cksums' in d:
             for line in d['install_files_from_cksums'].splitlines():
                 stripped = line.strip()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list