From 9c1d6cb1f7360b18c5670cc6a68f94acee11edad Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Thu, 4 Dec 2003 10:29:39 +0000 Subject: - Move plist creation to build target PR: ports/59681 Submitted by: Simun Mikecin Approved by: maintainer Approved by: adamw (mentor) --- games/HeroesOfMightAndMagic/scripts/configure | 35 ++++++++++++++++++++++++++ games/HeroesOfMightAndMagic/scripts/do-install | 13 +--------- 2 files changed, 36 insertions(+), 12 deletions(-) (limited to 'games/HeroesOfMightAndMagic') diff --git a/games/HeroesOfMightAndMagic/scripts/configure b/games/HeroesOfMightAndMagic/scripts/configure index b23b90c2e439..159db7c06d48 100644 --- a/games/HeroesOfMightAndMagic/scripts/configure +++ b/games/HeroesOfMightAndMagic/scripts/configure @@ -53,4 +53,39 @@ echo MUSIC=$answ >> $F yesno NO "Do you want to install Videos (137 MB) " echo VIDEOS=$answ >> $F +. $F + +cat ${PKGDIR}/files/pkg-plist.base > ${PLIST} + +# Scenario files +if [ $SCENARIO = YES ]; then + cat ${PKGDIR}/files/pkg-plist.scenario >> ${PLIST} +else + echo ${GAMESUBDIR}/maps >> ${PLIST} +fi + +# Neither sound nor Music, make the whole data tree a link +if [ $GRAPHIC = NO -a $MUSIC = NO ]; then + echo ${GAMESUBDIR}/data/video >> ${PLIST} +else + cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} +fi + +# Videos +if [ $VIDEOS = YES ]; then + cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} +fi + + + +# Music +if [ $MUSIC = YES ]; then + cat ${PKGDIR}/files/pkg-plist.music >> ${PLIST} +else + echo ${GAMESUBDIR}/mp3 >> ${PLIST} +fi + +echo @dirrm ${GAMESUBDIR}/data >> ${PLIST} +echo @dirrm ${GAMESUBDIR} >> ${PLIST} + exit 0 diff --git a/games/HeroesOfMightAndMagic/scripts/do-install b/games/HeroesOfMightAndMagic/scripts/do-install index 7b17e5a55ce3..489da4882cc7 100644 --- a/games/HeroesOfMightAndMagic/scripts/do-install +++ b/games/HeroesOfMightAndMagic/scripts/do-install @@ -21,11 +21,11 @@ ${INSTALL_DATA} ${CD}/icon.bmp ${CD}/icon.xpm ${GAMEDIR} # INSTALL_PROGRAM (its parameter -s) currupts the file. Using cp. cp ${CD}/bin/x86/heroes3 ${GAMEDIR} +chmod 755 ${GAMEDIR}/heroes3 brandelf -t Linux ${GAMEDIR}/heroes3 ln -sf ${GAMEDIR}/heroes3 ${LOCALBASE}/bin/heroes3 touch ${GAMEDIR}/data/hiscore.dat chmod 666 ${GAMEDIR}/data/hiscore.dat -cat ${PKGDIR}/files/pkg-plist.base > ${PLIST} # Basis packet if [ $BASIC = YES ]; then @@ -43,18 +43,13 @@ if [ $SCENARIO = YES ]; then echo Installing Scenarios mkdir -p ${GAMEDIR}/maps ${INSTALL_DATA} ${CD}/maps/* ${GAMEDIR}/maps - cat ${PKGDIR}/files/pkg-plist.scenario >> ${PLIST} else ln -sf ${CD}/maps ${GAMEDIR}/maps - echo ${GAMESUBDIR}/maps >> ${PLIST} fi # Neither sound nor Music, make the whole data tree a link if [ $GRAPHIC = NO -a $MUSIC = NO ]; then ln -sf ${CD}/data/video ${GAMEDIR}/data/video - echo ${GAMESUBDIR}/data/video >> ${PLIST} -else - cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} fi # Graphics (recommended) @@ -77,7 +72,6 @@ if [ $VIDEOS = YES ]; then echo Installing Videos mkdir -p ${GAMEDIR}/data/video ${INSTALL_DATA} ${CD}/data/video/*.mpg ${GAMEDIR}/data/video - cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} elif [ $GRAPHIC = YES ]; then # Music is installed, so create links cd $CD/data/video @@ -92,15 +86,10 @@ if [ $MUSIC = YES ]; then echo Installing Music mkdir -p ${GAMEDIR}/mp3 ${INSTALL_DATA} ${CD}/mp3/* ${GAMEDIR}/mp3 - cat ${PKGDIR}/files/pkg-plist.music >> ${PLIST} else ln -sf ${CD}/mp3 ${GAMEDIR}/mp3 - echo ${GAMESUBDIR}/mp3 >> ${PLIST} fi - echo @dirrm ${GAMESUBDIR}/data >> ${PLIST} - echo @dirrm ${GAMESUBDIR} >> ${PLIST} - # Goodbye message if [ $BASIC = YES -a $GRAPHIC = YES ]; then echo -- cgit v1.2.3