Last active
October 25, 2015 17:12
-
-
Save hristoast/6b985037e34fd6659e4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=$(date +%F) | |
WINE_VERSION=1.7.52 | |
WINE_SHORT_VERSION=$(echo ${WINE_VERSION} | sed 's/\.//g') | |
ITERATION=1 | |
MYEMAIL=goes_here | |
DESCRIPTION="Wine ${WINE_VERSION} built on ${DATE} on and for LMDE2.\n\nWindows API implementation - 32-bit binary loader and libraries\n\nWine is a free MS-Windows API implementation. This is still a work in progress and many applications may still not work.\n\nThis package provides the binary loader for 32-bit Windows applications as well as the library that implements the Windows API; it includes all of wine versus the traditional Debian way of splitting it into packages." | |
INSTALL_PREFIX=/usr | |
function install_dependencies | |
{ | |
[[ -d ~/.rbenv ]] || git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
[[ -d ~/.rbenv/plugins/ruby-build ]] || git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# rbenv install 2.0.0-p643 | |
# gem install rubygems-update fpm lolcat | |
sudo apt-get build-dep -y wine | |
sudo apt install -y git libcapi20-dev libgtk-3-dev libsane-dev ocl-icd-opencl-dev git libva-dev | |
} | |
function clean_and_update_wine | |
{ | |
cd ~ | |
[[ -d wine ]] || git clone git://source.winehq.org/git/wine.git | |
cd wine | |
git clean -df | |
git checkout -- . | |
git checkout master | |
git pull | |
git checkout wine-${WINE_VERSION} | |
} | |
function clean_and_update_wine-staging | |
{ | |
cd ~ | |
[[ -d wine-staging ]] || git clone https://github.com/wine-compholio/wine-staging.git | |
cd wine-staging | |
git checkout master | |
git pull | |
git checkout v${WINE_VERSION} | |
} | |
function patch_wine | |
{ | |
cd ~/wine-staging/patches | |
./patchinstall.sh --all DESTDIR=~/wine | |
} | |
function build_wine | |
{ | |
mkdir wine${WINE_SHORT_VERSION} | |
cd ~/wine | |
./configure --prefix=${INSTALL_PREFIX} | |
let "j=$(cat /proc/cpuinfo | grep pro | wc -l) + 1" | |
make -j${j} | |
make install DESTDIR=${HOME}/wine${WINE_SHORT_VERSION} | |
} | |
function package_wine | |
{ | |
fpm -m ${MYEMAIL} -s dir -t deb -n "wine" -v ${WINE_VERSION} -C ${HOME}/wine${WINE_SHORT_VERSION} \ | |
-p ~/wine-full_VERSION-ITERATION_ARCH.deb --category otherosfs --depends libasound2-plugins \ | |
--depends libc6 --depends libgstreamer-plugins-base0.10-0 --depends libfreetype6 \ | |
--depends libldap-2.4-2 --depends libmpg123-0 --depends libncurses5 --depends libpng12-0 \ | |
--depends x11-utils --description "${DESCRIPTION}" --iteration ${ITERATION} --provides libwine \ | |
--provides libwine-capi --provides libwine-gl --provides libwine-ldap --provides libwine-openal \ | |
--provides libwine-print --provides libwine-sane --provides wine32 --provides wine-bin \ | |
--provides wine-doc --provides wine-utils --replaces libwine --replaces libwine-capi \ | |
--replaces libwine-gl --replaces libwine-ldap --replaces libwine-openal --replaces libwine-print \ | |
--replaces libwine-sane --replaces wine32 --replaces wine-bin --replaces wine-doc \ | |
--replaces wine-utils usr | |
} | |
install_dependencies | |
clean_and_update_wine | |
clean_and_update_wine-staging | |
patch_wine | |
build_wine | |
package_wine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment