Changeset 253


Ignore:
Timestamp:
Jun 25, 2018, 1:58:32 PM (2 years ago)
Author:
g7moreau
Message:
  • update make package script
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ddt/make-package-debian

    r233 r253  
    1111[ -n "${tmp_folder}" -a -d "${tmp_folder}" ] || exit 1
    1212
    13 # Set Version
    14 DDT_VERSION=$(grep 'version->declare' ddt | cut -f 2 -d "'") #'
    15 LOCAL_VERSION=5
     13# Set Name and Version
     14PKG_NAME=ddt
     15CODE_VERSION=$(grep 'version->declare' ddt | cut -f 2 -d "'") #'
     16PKG_VERSION=6
    1617
    1718# Create future tree
     
    2728(cd ${tmp_folder}/usr/bin;            ln -s ddt      dhcp-dns-tools)
    2829(cd ${tmp_folder}/usr/share/man/man1; ln -s ddt.1.gz dhcp-dns-tools.1.gz)
     30chmod -R a+rx        ${tmp_folder}/usr/bin/ddt
     31chmod -R a+rX,go-w   ${tmp_folder}/usr
     32chmod -R a+rX,go-w   ${tmp_folder}/etc
    2933
    3034# Data archive
    3135rm -f ${tmp_folder}/data.tar.gz
    32 (cd ${tmp_folder}; tar czf data.tar.gz ./usr ./etc)
     36(cd ${tmp_folder}; tar --owner root --group root -czf data.tar.gz ./usr ./etc)
    3337
    3438# Control file
    3539cat <<END > ${tmp_folder}/control
    36 Package: ddt
    37 Version: ${DDT_VERSION}-${LOCAL_VERSION}
     40Package: ${PKG_NAME}
     41Version: ${CODE_VERSION}-${PKG_VERSION}
    3842Section: utils
    3943Tag: implemented-in::perl, interface::commandline, role::program
     
    6165# Control archive
    6266rm -f ${tmp_folder}/control.tar.gz
    63 (cd ${tmp_folder}; tar czf control.tar.gz control)
     67(cd ${tmp_folder}; tar --owner root --group root -czf control.tar.gz control)
    6468
    6569# Format deb package
     
    6771
    6872# Create package (control before data)
    69 ar -r ddt_${DDT_VERSION}-${LOCAL_VERSION}_all.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
     73ar -r ${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
    7074     
    7175# Clean
     
    7478# Prepare reprepro upload
    7579echo "# Prepare reprepro upload"
    76 echo "( cd /srv/www/debian/ ; reprepro includedeb wheezy   ~/wheezy/ddt_${DDT_VERSION}-${LOCAL_VERSION}_all.deb )"
    77 echo "( cd /srv/www/debian/ ; reprepro includedeb jessie   ~/jessie/ddt_${DDT_VERSION}-${LOCAL_VERSION}_all.deb )"
    78 echo "( cd /srv/www/debian/ ; reprepro includedeb stretch ~/stretch/ddt_${DDT_VERSION}-${LOCAL_VERSION}_all.deb )"
     80echo "( cd /srv/www/debian/ ; reprepro includedeb wheezy   ~/wheezy/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
     81echo "( cd /srv/www/debian/ ; reprepro includedeb jessie   ~/jessie/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
     82echo "( cd /srv/www/debian/ ; reprepro includedeb stretch ~/stretch/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
    7983echo "( cd /srv/www/debian/ ; reprepro dumpreferences ) | grep -i ddt"
  • trunk/nagios-velvice/make-package-debian

    r252 r253  
    1111[ -n "${tmp_folder}" -a -d "${tmp_folder}" ] || exit 1
    1212
    13 # Set Version
    14 VELVICE_VERSION=$(grep 'version->declare' velvice.cgi | cut -f 2 -d "'") #'
    15 LOCAL_VERSION=3
     13# Set Name and Version
     14PKG_NAME=nagios3-velvice
     15CODE_VERSION=$(grep 'version->declare' velvice.cgi | cut -f 2 -d "'") #'
     16PKG_VERSION=3
    1617
    1718# Create future tree
     
    3435# Control file
    3536cat <<END > ${tmp_folder}/control
    36 Package: nagios3-velvice
    37 Version: ${VELVICE_VERSION}-${LOCAL_VERSION}
     37Package: ${PKG_NAME}
     38Version: ${CODE_VERSION}-${PKG_VERSION}
    3839Section: utils
    3940Tag: implemented-in::perl, interface::commandline, role::program
     
    5758
    5859# Create package (control before data)
    59 ar -r nagios3-velvice_${VELVICE_VERSION}-${LOCAL_VERSION}_all.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
     60ar -r ${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
    6061     
    6162# Clean
     
    6465# Prepare reprepro upload
    6566echo "# Prepare reprepro upload"
    66 echo "( cd /srv/www/debian/ ; reprepro includedeb wheezy   ~/wheezy/nagios3-velvice_${VELVICE_VERSION}-${LOCAL_VERSION}_all.deb )"
    67 echo "( cd /srv/www/debian/ ; reprepro includedeb jessie   ~/jessie/nagios3-velvice_${VELVICE_VERSION}-${LOCAL_VERSION}_all.deb )"
    68 echo "( cd /srv/www/debian/ ; reprepro includedeb stretch ~/stretch/nagios3-velvice_${VELVICE_VERSION}-${LOCAL_VERSION}_all.deb )"
     67echo "( cd /srv/www/debian/ ; reprepro includedeb wheezy   ~/wheezy/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
     68echo "( cd /srv/www/debian/ ; reprepro includedeb jessie   ~/jessie/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
     69echo "( cd /srv/www/debian/ ; reprepro includedeb stretch ~/stretch/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
    6970echo "( cd /srv/www/debian/ ; reprepro dumpreferences ) | grep -i nagios3-velvice"
  • trunk/project-meta/make-package-debian

    r216 r253  
    1111[ -n "${tmp_folder}" -a -d "${tmp_folder}" ] || exit 1
    1212
    13 # Set Version
    14 PROJECT_META_VERSION=$(grep 'version->declare' project-meta | cut -f 2 -d "'")
    15 LOCAL_VERSION=1
     13# Set Name and Version
     14PKG_NAME=project-meta
     15CODE_VERSION=$(grep 'version->declare' project-meta | cut -f 2 -d "'") #'
     16PKG_VERSION=2
    1617
    1718# Create future tree
     
    2829cp template.d/*.tt               ${tmp_folder}/usr/share/project-meta/template.d/
    2930cp project-meta.bash_completion  ${tmp_folder}/etc/bash_completion.d/
     31chmod -R a+rx        ${tmp_folder}/usr/bin/project-meta
     32chmod -R a+rX,go-w   ${tmp_folder}/usr
     33chmod -R a+rX,go-w   ${tmp_folder}/etc
    3034
    3135# Data archive
    3236rm -f ${tmp_folder}/data.tar.gz
    33 (cd ${tmp_folder}; tar czf data.tar.gz ./usr ./etc)
     37(cd ${tmp_folder}; tar --owner root --group root -czf data.tar.gz ./usr ./etc)
    3438
    3539# Control file
    3640cat <<END > ${tmp_folder}/control
    37 Package: project-meta
    38 Version: ${PROJECT_META_VERSION}-${LOCAL_VERSION}
     41Package: ${PKG_NAME}
     42Version: ${CODE_VERSION}-${PKG_VERSION}
    3943Section: utils
    4044Tag: implemented-in::perl, interface::commandline, role::program,
     
    5559# Control archive
    5660rm -f ${tmp_folder}/control.tar.gz
    57 (cd ${tmp_folder}; tar czf control.tar.gz control)
     61(cd ${tmp_folder}; tar --owner root --group root -czf control.tar.gz control)
    5862
    5963# Format deb package
     
    6165
    6266# Create package (control before data)
    63 ar -r project-meta_${PROJECT_META_VERSION}-${LOCAL_VERSION}_amd64.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
     67ar -r ${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_amd64.deb ${tmp_folder}/debian-binary ${tmp_folder}/control.tar.gz ${tmp_folder}/data.tar.gz
    6468     
    6569# Clean
     
    6872# Prepare reprepro upload
    6973echo "# Prepare reprepro upload"
    70 echo "( cd /srv/www/debian/ ; reprepro includedeb jessie ~/jessie/project-meta_${PROJECT_META_VERSION}-${LOCAL_VERSION}_amd64.deb )"
     74echo "( cd /srv/www/debian/ ; reprepro includedeb jessie ~/jessie/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_amd64.deb )"
    7175echo "( cd /srv/www/debian/ ; reprepro dumpreferences ) | grep -i project-meta"
Note: See TracChangeset for help on using the changeset viewer.