Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/dash
- # libfm-gtk-git.sh version 2015.08.12 Weremouse
- # start
- if [ "$(id -u)" = "0" ]; then exit 1; fi
- printf "\033[7m"; date "+%a, %m %b %Y %T %z"
- printf "\nYou need to install all build dependencies first. \033[0m\n"
- libfm_release=1
- if [ ! "$1" = "" ]; then libfm_release=$1; fi
- sudo rm -r libfm && echo "libfm removed" && echo && sleep 3
- sudo dpkg -P libfm-extra4 libmenu-cache3 libmenu-cache-dev libmenu-cache-bin libfm-gtk-git && echo "done" && echo
- sudo apt-get install libmenu-cache-dev && echo "done" && echo
- # git pull
- if [ ! -d libfm ]; then
- printf "\n\033[7mgit clone \033[0m\n"
- git clone https://github.com/lxde/libfm.git || exit 1
- fi
- printf "\n\033[7mgit pull --all \033[0m\n"
- cd libfm
- git pull --all || exit 1
- libfm_version=$(git describe --always --abbrev=10 | sed "s/-/./g")
- # configure and compile
- # the only difference to the Arch build is another prefix
- printf "\n\033[7mconfigure and build libfm \033[0m\n"
- if [ "$(ls libfm-gtk-git-$libfm_version-$libfm_release_*.deb)" = "" ]; then
- printf " this isn't an error\n\n"
- ./autogen.sh
- ./configure \
- --with-gtk \
- --enable-gtk-doc \
- --disable-udisks \
- --enable-actions \
- --prefix="/usr/local" \
- --sysconfdir="/etc"
- make
- else
- echo "The package $(ls libfm-gtk-git-$libfm_version-$libfm_release_*.deb) already exists."; exit 1
- fi
- # build package and resolve issues
- printf "\n\033[7mbuild package and resolve issues \033[0m\n"
- printf "\n\033[7mYou need to install all runtime dependencies. \nThe package doesn't include dependency information.\033[0m\n"
- #libfm_pkgs=libfm4,libfm-data,libfm-dev,libfm-doc,libfm-gtk4,libfm-gtk-data,libfm-gtk-dev,libfm-modules,libfm-tools,lxshortcut
- sudo checkinstall -y \
- --install=no \
- --pkgname=libfm-gtk-git \
- --pkgversion=$libfm_version \
- --pkgrelease=$libfm_release \
- --pkglicense=GPL2 \
- #--provides=$libfm_pkgs \
- #--replaces=$libfm_pkgs \
- #--conflicts=$libfm_pkgs \
- # libmenu-cache is a build dependency, that forces to install libfm-extra4
- # libfm-extra.so.4 -> libfm-extra.so.4.0.3 is build from the upstream source
- # so building libfm requires itself as a build dependency
- # this is odd, we need to remove libfm-extra4 and install libmenu-cache3, libmenu-cache-dev and libmenu-cache-bin again
- # for some unknown reason a dummy packages are needed, so libfm_pkgs lines are commented out
- # if using libfm not only for lxpanel, other dummy packages might be needed too
- sudo dpkg -P libfm-extra4 libmenu-cache3 libmenu-cache-dev libmenu-cache-bin
- # TODO replace with loop or function
- str=libfm-extra4
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- str=libfm-data
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- str=libfm-gtk-data
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- str=libfm-gtk4
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- str=libfm-modules
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- str=libfm4
- echo "Section: misc" > $str
- echo "Priority: optional" >> $str
- echo "Standards-Version: 3.9.2" >> $str
- echo "Package: $str" >> $str
- echo "Version: $libfm_version-$libfm_release" >> $str
- echo "Provides: $str" >> $str
- echo "Replaces: $str" >> $str
- echo "Architecture: all" >> $str
- echo "Description: This dummy packge fakes to provide $str" >> $str
- equivs-build $str
- sudo dpkg -i "$str"_"$libfm_version-$libfm_release"_all.deb
- sudo apt-get install libmenu-cache3 libmenu-cache-dev libmenu-cache-bin
- sudo dpkg -i libfm-gtk-git_"$libfm_version-$libfm_release"_*.deb
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement