Commit 2c614ec8 authored by Brendan Long's avatar Brendan Long

Add easy-mode build.sh

parent 79ba08c6
## Dependencies
# GUPnP RUI Server
### Ubuntu 14.04
sudo apt-get install git valac libgupnp-dev libgee-0.8-dev libjson-glib-dev
# tup build tool
# see: http://gittup.org/tup/
sudo apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main'
sudo apt-get update
sudo apt-get install tup
### Fedora 20
sudo yum install fuse-devel gupnp-devel libgee-devel vala
# setup Tup
git clone git://github.com/gittup/tup.git
cd tup
./bootstrap.sh
sudo ln -s $PWD/tup /usr/local/bin/tup
cd ..
This serves UPnP RemoteUIs listed in the given config file (see config/config.json for an example).
## Getting Source
......@@ -29,14 +9,15 @@
## Build
tup init
tup upd
./build.sh
While developing, it can be useful to leave `tup` running in the background, autocompiling every time anything changes:
tup monitor -a
# stop with 'tup stop'
There is also a `clean.sh` script if you need it for some reason, but usually tup will take care of that automatically.
## Run
./src/server -c config/config.json
......
#!/bin/bash -e
TUP=tup
TUP_CHECKOUT=deps/.tup-checkout
FEDORA_PACKAGES="git vala gupnp-devel libgee-devel json-glib-devel fuse-devel"
UBUNTU_PACKAGES="git valac libgupnp-dev libgee-0.8-dev libjson-glib-dev libfuse-dev"
if [ -f /etc/fedora-release ]; then
for package in $FEDORA_PACKAGES ; do
if ! rpm -q $package > /dev/null ; then
echo "Installing packages: $FEDORA_PACKAGES"
sudo yum install -y $FEDORA_PACKAGES
break
fi
done
elif hash apt-get 2> /dev/null ; then
for package in $UBUNTU_PACKAGES ; do
if ! dpkg -s $package > /dev/null 2>&1 ; then
echo "Installing packages: $UBUNTU_PACKAGES"
sudo apt-get install -y $UBUNTU_PACKAGES
break
fi
done
else
echo "Unable to auto-install dependencies. Here's what we need one some distros:"
echo "On Fedora: sudo yum install $FEDORA_PACKAGES"
echo "On Ubuntu: sudo apt-get install $UBUNTU_PACKAGES"
fi
git submodule init
git submodule update
# Install tup if it doesn't exist
if ! hash tup 2> /dev/null; then
TUP=$TUP_CHECKOUT/tup
if [ ! -f $TUP ] ; then
if [ ! -d $TUP_CHECKOUT ]; then
git clone git://github.com/gittup/tup.git $TUP_CHECKOUT
fi
cd $TUP_CHECKOUT
echo $PWD
./bootstrap.sh
cd ../..
fi
fi
if ! [ -d .tup ]; then
$TUP init
fi
$TUP upd
echo "Done, now run:"
echo " ./src/browser -s static"
#!/bin/bash
echo "This command will delete everything that's not checked into this repo and its submodules."
read -r -p "Are you sure? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
;;
*)
exit
;;
esac
if ! hash tup 2> /dev/null; then
if [ -f deps/.tup-checkout/tup ]; then
deps/.tup-checkout/tup stop
fi
else
tup stop
fi
git clean -dxf
git submodule foreach git clean -dxf
echo "Done. You can also remove deps/.tup-checkout if you don't want tup either."
/.tup-checkout
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment