| 1 | #!/bin/sh |
| 2 | # |
| 3 | # This script configures Finit for Debian, which needs a few more plugins |
| 4 | # and tweaks than an embedded system usually does. |
| 5 | # |
| 6 | # Usage: |
| 7 | # user@jessie:~/finit$ contrib/debian/build.sh |
| 8 | # |
| 9 | |
| 10 | echo |
| 11 | echo "*** Configuring Finit for Debian" |
| 12 | |
| 13 | if [ ! -e configure ]; then |
| 14 | echo " The configure script is missing, maybe you're using a version from GIT?" |
| 15 | echo " Attempting to run the autogen.sh script, you will need these tools:" |
| 16 | echo " autoconf, automake, libtool, pkg-config ..." |
| 17 | echo |
| 18 | ./autogen.sh |
| 19 | fi |
| 20 | echo |
| 21 | |
| 22 | # The plugins are optional, but you may need D-Bus and X11 if you want |
| 23 | # to run X-Window, the other configure flags are however required. |
| 24 | ./configure \ |
| 25 | --prefix=/usr --exec-prefix= \ |
| 26 | --sysconfdir=/etc --localstatedir=/var \ |
| 27 | --enable-dbus-plugin --enable-x11-common-plugin \ |
| 28 | --enable-alsa-utils-plugin --with-keventd \ |
| 29 | --with-random-seed=/var/lib/urandom/random-seed |
| 30 | |
| 31 | if [ $? -ne 0 ]; then |
| 32 | echo |
| 33 | echo "*** Configure script failed, have you installed libuEv and libite?" |
| 34 | echo |
| 35 | exit 1 |
| 36 | fi |
| 37 | |
| 38 | echo |
| 39 | echo "*** Building ..." |
| 40 | echo |
| 41 | make |
| 42 | |
| 43 | if [ $? -ne 0 ]; then |
| 44 | echo |
| 45 | echo "*** The build failed for some reason" |
| 46 | echo |
| 47 | exit 1 |
| 48 | fi |
| 49 | |
| 50 | echo |
| 51 | echo "*** Done" |
| 52 | echo |
| 53 | |
| 54 | read -p "*** Run (sudo) install script (y/N)? " yorn |
| 55 | if [ "x$yorn" = "xy" -o "x$yorn" = "xY" ]; then |
| 56 | sudo contrib/debian/install.sh |
| 57 | else |
| 58 | echo |
| 59 | echo "*** Use 'sudo contrib/debian/install.sh' later to install Finit" |
| 60 | echo |
| 61 | fi |