Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Script for packaging a .deb

    Reply
    Page 2 of 2 | Prev |   1   2 |
    LABAUDIO | # 11 | 2009-04-11, 16:54 | Report

    OK TX TX TX a lot BrentDC

    binutils instaled...

    Now all work very good

    after launch the script, all is create

    but...

    in my .deb in final, no sounds .wav is in....

    iam shure its cause maybe 2 think

    -i have a syntax error in my script...
    -or my .wav sounds is not in good folder for be passed into deb when script work...

    so here my script again

    Code:
    #!/bin/sh
    
    # This script should be run from within the directory with the wav files.
    
    # First, create the empty tree under a new "build" directory
    # (the name "build" is completely arbitrary here)
    mkdir -p build/usr/share/sounds/
    
    # Put the sounds in the sounds directory
    cp -v ui-*.wav build/usr/share/sounds/
    
    # move into the build directory, make a docs directory
    cd build
    mkdir -p usr/share/doc/themevista
    
    # write the README file
    cat > usr/share/doc/themevista/README <<END
    This package provides replacement sound effects for Maemo.
    
    It moves the original sounds aside using dpkg-divert(8), and 
    restores them upon uninstallation.
    END
    
    # write the control file
    cat > control <<END
    Package: ThemeVista
    Version: 3.1
    Section: user/themes
    Priority: optional
    Architecture: all
    Installed-Size: `du -ks usr|cut -f 1`
    Maintainer: Alex Vevey <Alex-vevey@hotmail.com>
    Description: New Maemo sound effects (Vista Style), with auto-backup of the originals
     
     This package contains a set of sound effects for the OSSO Maemo ui. This
     version will preserve your current sounds using dpkg-divert(8) and
     restore them upon uninstallation.
     
     Updates to this package might be posted at
     Alex Vevey-Alex-vevey@hotmail.com
    END
    
    # write the pre-installation script
    cat > preinst <<END
    #!/bin/sh
    if [ "$1" = install ]; then
        for f in ui-battery_low.wav ui-charging_started.wav ui-confirmation_note.wav ui-connection_lost.wav ui-default_beep.wav ui-general_warning.wav ui-gesture_number_recognized.wav ui-information_note.wav ui-key_press.wav ui-new_email.wav ui-operation_ready.wav ui-pen_down.wav ui-recharge_battery.wav ui-shutdown.wav ui-thumb_keyboard_launch.wav ui-wake_up_tune.wav ui-window_close.wav ui-window_open.wav ui-wrong_charger.wav; do
            dpkg-divert --themevista --rename --add /usr/share/sounds/$f
        done
    fi
    END
    
    # write the post-removal script
    cat > postrm <<END
    #!/bin/sh
    if [ "$1" = remove ]; then
        for f in ui-battery_low.wav ui-charging_started.wav ui-confirmation_note.wav ui-connection_lost.wav ui-default_beep.wav ui-general_warning.wav ui-gesture_number_recognized.wav ui-information_note.wav ui-key_press.wav ui-new_email.wav ui-operation_ready.wav ui-pen_down.wav ui-recharge_battery.wav ui-shutdown.wav ui-thumb_keyboard_launch.wav ui-wake_up_tune.wav ui-window_close.wav ui-window_open.wav ui-wrong_charger.wav; do
            dpkg-divert --themevista --rename --remove /usr/share/sounds/$f
        done
    fi
    END
    
    # Setting this environment variable fixes Apple's modified GNU tar so that
    # it won't make dot-underscore AppleDouble files. Google it for details...
    export COPY_EXTENDED_ATTRIBUTES_DISABLE=1
    
    # create the data tarball
    # (the tar options "czvf" mean create, zip, verbose, and filename.)
    tar czvf data.tar.gz usr/share/sounds/ usr/share/doc/
    
    # create the control tarball
    tar czvf control.tar.gz control preinst postrm
    
    # create the debian-binary file
    echo 2.0 > debian-binary
    
    # create the ar (deb) archive
    ar -r themevista.deb debian-binary control.tar.gz data.tar.gz
    
    # move the new deb up a directory
    mv themevista.deb ..
    
    # remove the tarballs, and cd back up to where we started
    rm data.tar.gz control.tar.gz
    cd ..
    maybe the path for sounds is not good
    or my sounds is not in the good folder when i try packaged...

    TX to help me
    iam almost

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BrentDC | # 12 | 2009-04-11, 17:23 | Report

    I'm not much of a shell-scripter, I don't know what may be wrong with the script...

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to BrentDC For This Useful Post:
    LABAUDIO

     
    LABAUDIO | # 13 | 2009-04-11, 17:34 | Report

    ok TX for all anyway gratfull for you TX

    any others for my last issue?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 14 | 2009-04-12, 16:17 | Report

    any idea why the .wav sound is not copied in the .deb when i make pachaging...

    see all previous post in this thread for more explanations and thanks to tell me where is the error in the script / or what directory i suppose to place my .wav sound

    tX

    Edit | Forward | Quote | Quick Reply | Thanks

     
    twaelti | # 15 | 2009-04-12, 20:47 | Report

    Please check the maemo wiki for an article about py2deb!

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to twaelti For This Useful Post:
    LABAUDIO

     
    LABAUDIO | # 16 | 2009-04-13, 19:33 | Report

    Originally Posted by twaelti View Post
    Please check the maemo wiki for an article about py2deb!
    i just need to know where i need to put my sound files for be shure i include in the .deb package the sound lol

    like i said in past-post...all work exept somes files don't want to move in the .ar.gz and finaly .deb
    its my final issue whit the ''no application and gtkpg'' build .deb
    i work last week

    all is in front of my eyes and yours but i try and follow find soon i hope...
    i need to re-read the script i post up-here again and again
    some path error in the script...
    or a bad copy files in the rigth folder when i run the script (sources files where is the script).

    if i cant make it next week...i considerer py2deb
    but iam new bee and i work on the authorized and suggered way on website theme original conceptor

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by LABAUDIO; 2009-04-13 at 19:41.

     
    LABAUDIO | # 17 | 2009-04-13, 19:48 | Report

    Final answer : i got it!

    TX TO ALL FOR ALL TIP

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 18 | 2009-04-15, 23:29 | Report

    Originally Posted by LABAUDIO View Post
    OK TX TX TX a lot BrentDC

    binutils instaled...

    Now all work very good

    after launch the script, all is create

    but...

    in my .deb in final, no sounds .wav is in....

    iam shure its cause maybe 2 think

    -i have a syntax error in my script...
    -or my .wav sounds is not in good folder for be passed into deb when script work...

    so here my script again

    Code:
    #!/bin/sh
    
    # This script should be run from within the directory with the wav files.
    
    # First, create the empty tree under a new "build" directory
    # (the name "build" is completely arbitrary here)
    mkdir -p build/usr/share/sounds/
    
    # Put the sounds in the sounds directory
    cp -v ui-*.wav build/usr/share/sounds/
    
    # move into the build directory, make a docs directory
    cd build
    mkdir -p usr/share/doc/themevista
    
    # write the README file
    cat > usr/share/doc/themevista/README <<END
    This package provides replacement sound effects for Maemo.
    
    It moves the original sounds aside using dpkg-divert(8), and 
    restores them upon uninstallation.
    END
    
    # write the control file
    cat > control <<END
    Package: ThemeVista
    Version: 3.1
    Section: user/themes
    Priority: optional
    Architecture: all
    Installed-Size: `du -ks usr|cut -f 1`
    Maintainer: Alex Vevey <Alex-vevey@hotmail.com>
    Description: New Maemo sound effects (Vista Style), with auto-backup of the originals
     
     This package contains a set of sound effects for the OSSO Maemo ui. This
     version will preserve your current sounds using dpkg-divert(8) and
     restore them upon uninstallation.
     
     Updates to this package might be posted at
     Alex Vevey-Alex-vevey@hotmail.com
    END
    
    # write the pre-installation script
    cat > preinst <<END
    #!/bin/sh
    if [ "$1" = install ]; then
        for f in ui-battery_low.wav ui-charging_started.wav ui-confirmation_note.wav ui-connection_lost.wav ui-default_beep.wav ui-general_warning.wav ui-gesture_number_recognized.wav ui-information_note.wav ui-key_press.wav ui-new_email.wav ui-operation_ready.wav ui-pen_down.wav ui-recharge_battery.wav ui-shutdown.wav ui-thumb_keyboard_launch.wav ui-wake_up_tune.wav ui-window_close.wav ui-window_open.wav ui-wrong_charger.wav; do
            dpkg-divert --themevista --rename --add /usr/share/sounds/$f
        done
    fi
    END
    
    # write the post-removal script
    cat > postrm <<END
    #!/bin/sh
    if [ "$1" = remove ]; then
        for f in ui-battery_low.wav ui-charging_started.wav ui-confirmation_note.wav ui-connection_lost.wav ui-default_beep.wav ui-general_warning.wav ui-gesture_number_recognized.wav ui-information_note.wav ui-key_press.wav ui-new_email.wav ui-operation_ready.wav ui-pen_down.wav ui-recharge_battery.wav ui-shutdown.wav ui-thumb_keyboard_launch.wav ui-wake_up_tune.wav ui-window_close.wav ui-window_open.wav ui-wrong_charger.wav; do
            dpkg-divert --themevista --rename --remove /usr/share/sounds/$f
        done
    fi
    END
    
    # Setting this environment variable fixes Apple's modified GNU tar so that
    # it won't make dot-underscore AppleDouble files. Google it for details...
    export COPY_EXTENDED_ATTRIBUTES_DISABLE=1
    
    # create the data tarball
    # (the tar options "czvf" mean create, zip, verbose, and filename.)
    tar czvf data.tar.gz usr/share/sounds/ usr/share/doc/
    
    # create the control tarball
    tar czvf control.tar.gz control preinst postrm
    
    # create the debian-binary file
    echo 2.0 > debian-binary
    
    # create the ar (deb) archive
    ar -r themevista.deb debian-binary control.tar.gz data.tar.gz
    
    # move the new deb up a directory
    mv themevista.deb ..
    
    # remove the tarballs, and cd back up to where we started
    rm data.tar.gz control.tar.gz
    cd ..
    maybe the path for sounds is not good
    or my sounds is not in the good folder when i try packaged...

    TX to help me
    iam almost
    any idea about why my .wav sound is not in final .deb package after compile the script up here??

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jolouis | # 19 | 2009-04-16, 13:46 | Report

    Hey LAB, you can try to narrow the problem down a bit by doing some troubleshooting.
    1) Does the build/usr/share/sounds directory that the script creates actaully contain any sound files after you've finished running the script (the script cleans up the .tar.gz's it makes, but not your build directories so they should still be there). If not, it's probably a path/file location problem
    2) If #1 is ok, next step is to check to see if your data.tar.gz file actually had the sound files in it. Go into your script and place a # sign infront of the second last line that reads
    Code:
    rm data.tar.gz control.tar.gz
    Then run the script, go to your "build" directory, and issue
    Code:
     tar -tf data.tar.gz
    And see if it lists any files.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to jolouis For This Useful Post:
    LABAUDIO

     
    LABAUDIO | # 20 | 2009-04-16, 16:51 | Report

    Originally Posted by jolouis View Post
    Hey LAB, you can try to narrow the problem down a bit by doing some troubleshooting.
    1) Does the build/usr/share/sounds directory that the script creates actaully contain any sound files after you've finished running the script (the script cleans up the .tar.gz's it makes, but not your build directories so they should still be there). If not, it's probably a path/file location problem
    2) If #1 is ok, next step is to check to see if your data.tar.gz file actually had the sound files in it. Go into your script and place a # sign infront of the second last line that reads
    Code:
    rm data.tar.gz control.tar.gz
    Then run the script, go to your "build" directory, and issue
    Code:
     tar -tf data.tar.gz
    And see if it lists any files.
    Positive :all sounds is in the .deb
    but not possible to install

    anyway
    i got a new way for make what i want but i need

    automake
    fakeroot

    how i can install this 2 things?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to LABAUDIO For This Useful Post:
    epitaph

     
    Page 2 of 2 | Prev |   1   2 |
vBulletin® Version 3.8.8
Normal Logout