IIRC I used the following script, to build a broken package, but the
files missing by the package, were copied by the script to the
appropriate locations:

[root@moonstudio ~]# cat /usr/src/qjackctl.sh  
#!/bin/bash

version="qjackctl.sh 2015.09.17"

chlog() {
echo "qjackctl ($qjackctl_version-1) wily; urgency=low"
cat<<EOF

  * git pull
    improved user interface
    build with Qt5

EOF
echo " -- No Maintainer <no.maintai...@nomaintainer.com>  $(date "+%a, %d %b %Y 
%T %z")"
echo
}

usage() {
echo $version
cat<<EOF
Without root privileges run
 ./qjackctl.sh
EOF
exit
}

# start
[[ "$(id -u)" = "0" ]] && usage
printf "\033[7m"; date "+%a, %m %b %Y %T %z"; printf "\033[0m"
mkdir -p qjackctl.deb
cd qjackctl.deb

# git pull
if [ ! -d qjackctl-code ]; then
  printf "\n\033[7mgit clone                                   \033[0m\n"
  git clone git://git.code.sf.net/p/qjackctl/code qjackctl-code || exit 1
fi
printf "\n\033[7mgit pull --all                              \033[0m\n"
cd qjackctl-code
git pull --all || exit 1
qjackctl_version=$(git describe --always --abbrev=10|cut -f2 -d"l"|sed 
"s/_/./g"|sed "s/^.//")
cd ..
if [ -d reminder-qjackctl-$qjackctl_version ]; then
  echo "reminder-qjackctl-$qjackctl_version already exists."
  exit 1
fi

# update
printf "\n\033[7mUpdate and simulate dist-upgrade? [y/N]     \033[0m "
read -n1 char
echo
case $char in
  y|Y)
    sudo apt-get update && echo && sudo apt-get dist-upgrade --dry-run
    printf "\n\033[7mContinue without upgrading or exit? [C/e]   \033[0m "
    read -n1 char
    case $char in
      e|E) exit;;
    esac;;
esac

# get distro packages
printf "\n\033[7mget distro packages                         \033[0m\n"
if [ "$(ls -d reminder-qjackctl-*.g??????????)" = "" ]; then
  printf "    this isn't an error\n\n"
  gpg --keyserver hkp://pgp.uni-mainz.de --recv-keys 21B2133D
  echo
  apt-get source qjackctl
  mkdir reminder-qjackctl-$qjackctl_version || exit 1
else
  mv -i $(ls -d reminder-qjackctl-*.g??????????) 
reminder-qjackctl-$qjackctl_version || exit 1
fi
sudo apt-get build-dep qjackctl || exit 1
sudo apt-get install --no-install-recommends qtbase5-dev qtbase5-dev-tools 
qttools5-dev-tools libqt5x11extras5-dev || exit 1
cd qjackctl-code

# add changelog entry
printf "\n\033[7mlog changes                                \033[0m\n"
qjackctl_chanlog=$(cat debian/changelog)
chlog                     > debian/changelog
echo "$qjackctl_chanlog" >> debian/changelog
echo "done"

# correct description
sed -i s/"Qt4"/"Qt5"/g debian/control

# build packages
printf "\n\033[7mbuild packages                             \033[0m\n"
#printf "starting step 1 of 4 steps"
#libtoolize --force --copy --automake
#sleep 1
#printf "\033[26Dstarting step 2 of 4 steps"
#aclocal
#printf "\033[26Dstarting step 3 of 4 steps"
#autoreconf
#printf "\033[26Dstarting step 4 of 4 steps\n"
debuild -i -us -uc -b

# install packages and resolve dependencies
printf "\n\033[7minstall packages and resolve dependencies  \033[0m\n"
sudo dpkg -i $(ls ../*$qjackctl_version*deb | grep -v dbg)
echo
sudo apt-get install -f

# workaround
build=/usr/src/packages/BUILD/debian/qjackctl
sudo cp -ip $build/usr/bin/qjackctl /usr/bin/qjackctl
sudo cp -ip $build/usr/share/applications/qjackctl.desktop 
/usr/share/applications/qjackctl.desktop
sudo cp -ip $build/usr/share/icons/hicolor/32x32/apps/qjackctl.png 
/usr/share/icons/hicolor/32x32/apps/qjackctl.png
sudo cp -ip /usr/src/qjackctl.deb/qjackctl-0.3.13/debian/qjackctl.xpm 
/usr/share/pixmaps/qjackctl.xpm
# /workaround

rm ../qjackctl_*.debian.tar.xz  ../qjackctl_*.dsc  ../qjackctl_*.orig.tar.gz
echo
printf "\033[7m"; date "+%a, %m %b %Y %T %z"; printf "\033[0m"

exit

-- 
ubuntu-studio-users mailing list
ubuntu-studio-users@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-users

Reply via email to