Changeset 331360d


Ignore:
Timestamp:
Sep 17, 2009, 2:55:47 AM (15 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
c631d1a
Parents:
c061ab8
git-author:
Jessica B. Hamrick <jhamrick@…> (09/17/09 02:55:47)
git-committer:
Jessica B. Hamrick <jhamrick@…> (09/17/09 02:55:47)
Message:

Added debconf implementation and clean uninstall, but the actual functionality of sipbmp3 seems to be broken - it will send a zephyr and say it's playing the song, and then say "playback completed sucessfully", but both zephyrs come at the ~same time and there is no sound output.

Location:
sipbmp3/debian
Files:
11 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • sipbmp3/debian/changelog

    rc061ab8 r331360d  
     1sipbmp3 (1.1) unstable; urgency=low
     2
     3  * Implemented debconf to retrieve printer and zephyr class names.
     4  * Made uninstall cleaner (and when you purge, it purges
     5  configuration files and changes)
     6
     7 -- Jessica Hamrick <jhamrick@mit.edu>  Wed, 16 Sep 2009 15:58:40 -0400
     8
    19sipbmp3 (1.0) unstable; urgency=low
    210
  • sipbmp3/debian/control.in

    rc061ab8 r331360d  
    88Package: sipbmp3
    99Architecture: all
     10Pre-Depends: debconf
    1011Depends: ${shlibs:Depends}, ${misc:Depends}, mplayer, libimage-exiftool-perl, lprng | debathena-lprng, sysv-rc, adduser, debathena-zephyr-config, libzephyr3-krb, alsa-base
    1112Conflicts: pulseaudio
  • sipbmp3/debian/inst/edit-lpd.conf

    rc061ab8 r331360d  
    1 #!/bin/sh
     1#!/bin/sh -e
    22
     3echo "Editing /etc/lprng/lpd.conf..." >&2
    34# add the printcap path to lpd.conf
    45if [ -e /etc/lprng/lpd.conf ]; then
     
    78
    89    while read line; do
    9         printcap=$(echo "$line" | grep ^printcap_path=)
     10        printcap=$(echo "$line" | grep ^printcap_path= || true)
    1011        if [ -n "$printcap" ]; then
    11             lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap)
    12             printcap=$(echo "$line" | grep /etc/printcap)
     12            lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap || tre)
     13            printcap=$(echo "$line" | grep /etc/printcap || true)
    1314            if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then
    1415                echo "#$line" >> /etc/lprng/lpd.conf
     
    2829
    2930# add lpd_listen_port to lpd.conf
    30 lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515)
     31lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515 || true)
    3132if [ ! -n "$lpd_listen_port" ]; then
    3233    echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf
  • sipbmp3/debian/inst/edit-lpd.perms

    rc061ab8 r331360d  
    55# allow other users to dequeue music
    66# (comment out REJECT SERVICE=M
     7echo "Editing /etc/lprng/lpd.perms..." >&2
    78if [ -e /etc/lprng/lpd.perms ]; then
    89    mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
     
    1011
    1112    while read line; do
    12         reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER')
     13        reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER' || true)
    1314        if [ -n "$reject_not_server" ]; then
    1415            echo "#$line" >> /etc/lprng/lpd.perms
    1516        else
    16             reject_service=$(echo "$line" | grep '^REJECT SERVICE=M')
     17            reject_service=$(echo "$line" | grep '^REJECT SERVICE=M' || true)
    1718            if [ -n "$reject_service" ]; then
    1819                echo "#line" >> /etc/lprng/lpd.perms
  • sipbmp3/debian/inst/edit-printcap

    rc061ab8 r331360d  
    1 #!/bin/sh
     1#!/bin/sh -e
    22
     3echo "Editing /etc/printcap..." >&2
    34if [ ! -e /etc/printcap ]; then
    45    touch /etc/printcap
     
    910fi
    1011
    11 printcap=$(cat /etc/printcap | grep '^lprmp3')
     12. /usr/share/debconf/confmodule
     13db_get sipbmp3/printername
     14
     15printcap=$(cat /etc/printcap | grep ^`echo $RET` || true)
    1216if [ ! -n "$printcap" ]; then
    1317    # add the appropriate entry into /etc/printcap, /etc/lprng/printcap
    14     echo "lprmp3" >> /etc/printcap
     18    echo "$RET" >> /etc/printcap
    1519    echo "  :server" >> /etc/printcap
    16     echo "  :cm=lprmp3 music spooler" >> /etc/printcap
     20    echo "  :cm=$RET music spooler" >> /etc/printcap
    1721    echo "  :lp=/dev/null" >> /etc/printcap
    1822    echo "  :if=|/usr/lib/sipbmp3/sipbmp3-filter" >> /etc/printcap
    19     echo "  :sd=/var/spool/lpd/lprmp3" >> /etc/printcap
     23    echo "  :sd=/var/spool/lpd/$RET" >> /etc/printcap
    2024    echo "  :ml=0:mx=0:sh:sf" >> /etc/printcap
    2125    echo "  :create_files" >> /etc/printcap
  • sipbmp3/debian/inst/run-checkpc

    rc061ab8 r331360d  
    1 #!/bin/sh
     1#!/bin/sh -e
    22
    33# make sure directories exist for checkpc
     4echo "Running checkpc..." >&2
    45if [ ! -d /var/spool/lpd ]; then
    56    mkdir /var/spool/lpd
     
    1213chmod og=rwx /var/spool/lpd
    1314chmod og=rwx /var/spool/lpd/%P
    14 /usr/sbin/checkpc -Plprmp3 -f
     15
     16. /usr/share/debconf/confmodule
     17db_get sipbmp3/printername
     18/usr/sbin/checkpc -P"$RET" -f
  • sipbmp3/debian/lib/sipbmp3-filter

    rc061ab8 r331360d  
    2828
    2929# Configuration
    30 my $config_file = "/etc/sipbmp3-filter-config.pl";
     30my $config_file = "/usr/lib/sipbmp3/config/sipbmp3-filter-config.pl";
    3131if (-r $config_file) {
    3232    # Inline the configuration file
  • sipbmp3/debian/sipbmp3.dirs

    rc061ab8 r331360d  
    11usr/lib/sipbmp3
    22usr/lib/sipbmp3/inst
     3usr/lib/sipbmp3/rm
    34etc/
  • sipbmp3/debian/sipbmp3.install

    rc061ab8 r331360d  
    11debian/lib/* /usr/lib/sipbmp3/
    22debian/inst/* /usr/lib/sipbmp3/inst/
    3 debian/sipbmp3-filter-config.pl /etc/
     3debian/rm/* /usr/lib/sipbmp3/rm/
  • sipbmp3/debian/sipbmp3.postinst

    rc061ab8 r331360d  
    1818# the debian-policy package
    1919
     20. /usr/share/debconf/confmodule
    2021
    2122case "$1" in
    22     configure)
     23    configure|reconfigure)
     24        chmod +x /usr/lib/sipbmp3/inst/create-filter-config
    2325        chmod +x /usr/lib/sipbmp3/inst/edit-printcap
    2426        chmod +x /usr/lib/sipbmp3/inst/edit-lpd.conf
    2527        chmod +x /usr/lib/sipbmp3/inst/run-checkpc
    2628        chmod +x /usr/lib/sipbmp3/inst/edit-lpd.perms
     29        /usr/lib/sipbmp3/inst/create-filter-config
    2730        /usr/lib/sipbmp3/inst/edit-printcap
    2831        /usr/lib/sipbmp3/inst/edit-lpd.conf
     
    3033        /usr/lib/sipbmp3/inst/edit-lpd.perms
    3134
    32         adduser daemon audio
     35        if [ -e /usr/lib/sipbmp3/config/printer_name ]; then
     36            rm /usr/lib/sipbmp3/config/printer_name
     37        fi
     38
     39        if [ -e /usr/lib/sipbmp3/config/zephyr_class ]; then
     40            rm /usr/lib/sipbmp3/config/zephyr_class
     41        fi
     42
     43        inaudio=$(groups daemon | grep audio || true)
     44        if [ -z "$inaudio" ]; then
     45            adduser daemon audio
     46        fi
     47
     48        db_stop
    3349    ;;
    3450
Note: See TracChangeset for help on using the changeset viewer.