[Player-cvs] installer/deb Umakefil,1.6,1.7
dyek at helixcommunity.org dyek at helixcommunity.orgUpdate of /cvsroot/player/installer/deb In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv12033/player/installer/deb Modified Files: Umakefil Log Message: Merge from 310Atlas. Installer Changes: Package Names And Package File Names Made Consistent. The player rpm package, that had been around for a few years, was using RealPlayer package name. There is no way to make a .deb package to use RealPlayer as its package name. Debian package names are lower case and cannot use Camel Case or upper case. To make package names between the two consistent, we adopted hxplay and realplay as the package name. The current installer and package file names created by the packaging tools are as follow: hxplay-11.0.1.1056-linux-2.2-libc6-gcc32-i586.bin HelixPlayer-11.0.1.1056-20081001.i586.rpm hxplay_11.0.1.1056_i386.deb To make the package filenames consistent, several changes and tricks are needed. The SetInstallerName() method in installer/common/scripts/installer.py used by the player is changed by replacing sysinfo.id (SYSTEM_ID) with date as the release number. The .bin extension for the console installer is removed, so that the installer_name can be shared among all 3 kinds of installers. This is done in a way not to affect other project using MakeInstaller(), for example. There is no documented way for the rpm build process to specify the output filename. The player rpm module now defines the _rpmfilename custom macro as a trick to specify the output package filename. For .deb packaging system, the packagefilename is specified in the following command: dh_builddeb --filename packagefilename However, once --filename is used, the outer dpkg-buildpackage script and dpkg-genchanges script failed when it cannot find the original package filename. dpkg-buildpackage is simply not written to handle package filename being set explicitly. There is no good solution except to create a symbolic link providing the expected package filename. Now, the package filenames are: hxplay-11.3.0.13-20081002.i586.rpm hxplay-11.3.0.13-20081002.i586.deb hxplay-11.3.0.13-20081002.i586.bin Files Modified: installer/common/scripts/installer.py - Changed SetInstallerName() installer/common/scripts/unixinstaller.py - Moved ext block from installer.py player/installer/common/common.py - Move inst.target block from Umakefil player/installer/rpm/Umakefil - Specify rpm filename explicitly player/installer/rpm/HelixPlayer.spec - Change package name to hxplay player/installer/rpm/RealPlayer-rn.spec - Change package name to realplay player/installer/deb/Umakefil - Specify deb filename. player/installer/deb/common_deb/rules - Pull package filename from installer.py Refer to the following URLs for more information: http://lists.helixcommunity.org/pipermail/installer-dev/2008-October/000069.html http://lists.helixcommunity.org/pipermail/player-dev/2008-October/003935.html Index: Umakefil =================================================================== RCS file: /cvsroot/player/installer/deb/Umakefil,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Umakefil 6 Jul 2008 20:11:59 -0000 1.6 +++ Umakefil 3 Oct 2008 05:54:49 -0000 1.7 @@ -58,7 +58,10 @@ execfile(os.path.join(project.src_root_path, 'player', 'installer', 'common', 'common.py')) -# The installation diretory should come from common.py, but is not now. +# The installation diretory should be set in common.py. +# If this Umakefil is later converted to a generic builddeb.py script and +# moved to the installer project, +# the installation directory can be passed into script via command line options. inst_dir = "BogusValueFromUmakefil" if inst.product_name == "hxplay": inst_dir = "/opt/helix/HelixPlayer" @@ -72,7 +75,14 @@ src_debian_folder = 'common_deb' debian_folder_parent_dir = inst.product_name + '-' + major_ver # hxplay-11 or realplay-11 debian_folder = os.path.join(debian_folder_parent_dir, 'debian') -deb_package_name = inst.product_name + '_' + version_txt + '_*.deb' +# deb_package_name is the default deb package filename. +deb_package_name = inst.product_name + '_' + version_txt + '_' + sysinfo.arch + '.deb' + +# As SetInstallerName() set installer_name to <product_name>-<version>-<reldate>.<target>, +# where ext isn't specified. +installer_name = inst.installer_name + '.deb' + + # -b: binary-only, do not build source. # -uc: unsigned changes. @@ -94,6 +104,7 @@ # Leave a space after "$" to avoid make interprete "$@". project.writeln("\tsed -i 's@^INST_DIR:=.*$ @INST_DIR:=" + inst_dir + "@' " + debian_folder + "/rules ") project.writeln("\tsed -i 's@^PRODUCT_NAME:=.*$ @PRODUCT_NAME:=" + inst.product_name + "@' " + debian_folder + "/rules ") +project.writeln("\tsed -i 's@^INSTALLER_NAME:=.*$ @INSTALLER_NAME:=" + installer_name + "@' " + debian_folder + "/rules ") project.writeln('') project.writeln('\tsed -i "s at INST_DIR@' + inst_dir + '@" ' + debian_folder + '/prerm ') @@ -105,6 +116,11 @@ project.writeln('\tsed -i "{ 1 s/[^(]*(.*)/' + inst.product_name + ' (' + version_txt + ')/ }" ' + debian_folder + '/changelog ') project.writeln('') +project.writeln('\t at echo Workaround dpkg-buildpackage and dpkg-genchanges expected file not found error!') +project.writeln('\trm -f ' + deb_package_name) +project.writeln('\tln -s ' + installer_name + ' ' + deb_package_name) +project.writeln('') + project.writeln('\t at echo Copying source tarball...') project.writeln('\tcp ' + src_tarball + ' ' + debian_folder_parent_dir) project.writeln('') @@ -115,11 +131,11 @@ project.writeln('') project.writeln('copy:') -project.writeln('\tcp ' + deb_package_name + ' ' + project.target_dir) +project.writeln('\tcp ' + installer_name + ' ' + project.target_dir) project.writeln('clean:') project.writeln('\trm -rf ' + debian_folder_parent_dir) -project.writeln('\trm -f ' + inst.product_name + '_*.deb') -project.writeln('\trm -f ' + inst.product_name + '_*.changes') +project.writeln('\trm -f ' + inst.product_name + '*.deb') +project.writeln('\trm -f ' + inst.product_name + '*.changes') EmptyTarget()