├── .gitignore ├── alsa ├── alsa-ipc-gid.patch └── alsa.build ├── dev-packages ├── eepromutils └── eepromutils.build ├── emacs └── emacs.build ├── gpsd ├── 60-gpsd.rules └── gpsd.build ├── modules └── copy_modules.sh ├── mydata.tgz ├── opencpn ├── opencpn.build └── plugins │ ├── watchdog_pi.build │ └── weather_routing_pi.build ├── packages ├── portaudio └── portaudio.build ├── pypilot_dependencies ├── README ├── avrdude │ └── avrdude.build ├── blas │ └── blas.build ├── hat │ ├── RPi.GPIO.build │ ├── python-PIL │ │ └── python-PIL.build │ └── wiringPi.build ├── lapack │ └── lapack.build ├── lirc │ └── lirc.build ├── python-RTIMULib │ └── python-RTIMULib.build ├── python-numpy │ └── python-numpy.build ├── python-pylirc │ └── python-lirc.build ├── python-pyudev │ └── python-pyudev.build ├── python-scipy │ ├── python-scipy.build │ └── python-scipy2.build ├── python-serial.build ├── python-spidev │ └── python-spidev.build ├── python-ujson │ └── python-ujson.build ├── signalk │ ├── python-certifi.build │ ├── python-chardet.build │ ├── python-idna.build │ ├── python-ifaddr.build │ ├── python-requests.build │ ├── python-urllib3.build │ ├── python-websocket.build │ └── python-zeroconf.build └── web │ ├── all │ ├── python-babel.build │ ├── python-bidict.build │ ├── python-click.build │ ├── python-engineio.build │ ├── python-flask.build │ ├── python-flask_socketio.build │ ├── python-gevent.build │ ├── python-gevent_websocket.build │ ├── python-greenlet.build │ ├── python-itsdangerous.build │ ├── python-jinja2.build │ ├── python-markupsafe.build │ ├── python-six.build │ ├── python-socketio.build │ └── python-werkzeug.build ├── runit └── runit.build ├── scons └── scons.build ├── serialposix.py └── wxWidgets └── wxWidgets.build /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | pypilot 3 | -------------------------------------------------------------------------------- /alsa/alsa-ipc-gid.patch: -------------------------------------------------------------------------------- 1 | diff -Naur usr/local/share/alsa/alsa.conf newusr/local/share/alsa/alsa.conf 2 | --- usr/local/share/alsa/alsa.conf 2016-05-24 03:34:47.469427839 +0000 3 | +++ newusr/local/share/alsa/alsa.conf 2016-05-24 03:38:19.029427758 +0000 4 | @@ -73,7 +73,7 @@ 5 | defaults.pcm.compat 0 6 | defaults.pcm.minperiodtime 5000 # in us 7 | defaults.pcm.ipc_key 5678293 8 | -defaults.pcm.ipc_gid audio 9 | +defaults.pcm.ipc_gid staff 10 | defaults.pcm.ipc_perm 0660 11 | defaults.pcm.dmix.max_periods 0 12 | defaults.pcm.dmix.rate 48000 13 | -------------------------------------------------------------------------------- /alsa/alsa.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=alsa-lib-1.1.1.tar.bz2 14 | WRKDIR=alsa-lib-1.1.1 15 | EXTNAM=alsa 16 | TMPDIR=/tmp/alsa 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | INITIALDIR=$PWD 23 | 24 | # Remove dirs and files left from previous creation 25 | 26 | rm -r -f $WRKDIR 27 | 28 | rm -r -f $TMPDIR 29 | 30 | # Crete temporary directory 31 | 32 | mkdir -p $TMPDIR 33 | 34 | ###################################################### 35 | # Compile extension # 36 | ###################################################### 37 | 38 | # Export variables needed for compilation 39 | 40 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 41 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 42 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 43 | 44 | # Unpack source in current directory 45 | 46 | tar -xf $SRCNAM 47 | 48 | # Configure it 49 | 50 | cd $WRKDIR 51 | ./configure --prefix=/usr/local --enable-shared --disable-python 52 | 53 | # Compile 54 | 55 | make -j2 56 | 57 | # Install in base temp dir 58 | 59 | make install DESTDIR=$TMPDIR 60 | 61 | # Delete compilation work directory 62 | 63 | cd .. 64 | rm -r -f $WRKDIR 65 | 66 | # Adjust directory access rigths 67 | 68 | find $TMPDIR/ -type d | xargs chmod -v 755; 69 | 70 | # Strip executables 71 | 72 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 73 | 74 | # Move files to dev extension 75 | 76 | mkdir -p $TMPDIR-dev/usr/local/lib 77 | mv $TMPDIR/usr/local/include $TMPDIR-dev/usr/local 78 | mv $TMPDIR/usr/local/lib/*.a $TMPDIR-dev/usr/local/lib 79 | mv $TMPDIR/usr/local/lib/*.la $TMPDIR-dev/usr/local/lib 80 | mv $TMPDIR/usr/local/lib/pkgconfig $TMPDIR-dev/usr/local/lib 81 | 82 | # Change gid 83 | 84 | cp *.patch $TMPDIR 85 | cd $TMPDIR 86 | cd usr 87 | patch -p1 < alsa-ipc-gid.patch 88 | cd .. 89 | rm -f alsa-ipc-gid.patch 90 | 91 | ################################################### 92 | # Create base extension in temp dir # 93 | ################################################### 94 | 95 | cd $TMPDIR 96 | cd .. 97 | mksquashfs $TMPDIR $EXTNAM.tcz 98 | cd $TMPDIR 99 | find usr -not -type d > $EXTNAM.tcz.list 100 | mv ../$EXTNAM.tcz . 101 | 102 | # Create md5 file 103 | 104 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 105 | 106 | sudo cp -v $EXTNAM.tcz /mnt/mmcblk0p2/tce/optional 107 | 108 | # Cleanup temp directory 109 | 110 | rm -rf * 111 | 112 | 113 | ################################################### 114 | # Create dev extension in temp dir # 115 | ################################################### 116 | 117 | cd $TMPDIR-dev 118 | cd .. 119 | mksquashfs $TMPDIR-dev $EXTNAM-dev.tcz 120 | cd $TMPDIR-dev 121 | find usr -not -type d > $EXTNAM-dev.tcz.list 122 | mv ../$EXTNAM-dev.tcz . 123 | 124 | # Create md5 file 125 | 126 | md5sum $EXTNAM-dev.tcz > $EXTNAM-dev.tcz.md5.txt 127 | 128 | sudo cp -v $EXTNAM-dev.tcz /mnt/mmcblk0p2/tce/optional 129 | 130 | rm -rf * 131 | 132 | cd $INITIALDIR 133 | -------------------------------------------------------------------------------- /dev-packages: -------------------------------------------------------------------------------- 1 | Xlibs 2 | Xorg 3 | Xprogs 4 | acl-dev 5 | acl 6 | alsa-dev 7 | alsa-modules-4.4.20-piCore_v7+ 8 | alsa-utils 9 | alsa 10 | aterm 11 | atk-dev 12 | atk 13 | attr-dev 14 | attr 15 | autoconf 16 | automake 17 | binutils 18 | bison-dev 19 | bison 20 | blas 21 | bzip2-dev 22 | bzip2-lib 23 | bzip2 24 | cairo-dev 25 | cairo 26 | cmake 27 | cpufrequtils 28 | curl-dev 29 | curl 30 | dillo3 31 | dnsmasq 32 | emacs 33 | expat2-dev 34 | expat2 35 | file 36 | firmware-atheros 37 | firmware-ralinkwifi 38 | firmware-rpi3-wireless 39 | firmware-rtlwifi 40 | flex 41 | fltk-1.3 42 | flwm_topside 43 | fontconfig-dev 44 | fontconfig 45 | freetype-dev 46 | freetype 47 | gamin-dev 48 | gamin 49 | gcc 50 | gcc_libs-dev 51 | gcc_libs 52 | gdb 53 | gdbm-dev 54 | gdbm 55 | gdk-pixbuf-dev 56 | gdk-pixbuf 57 | gettext-dev 58 | gettext 59 | giflib 60 | git 61 | glib2-dev 62 | glib2 63 | glibc_base-dev 64 | glu-dev 65 | glu 66 | gmp-dev 67 | gmp 68 | gnutls-dev 69 | gnutls 70 | gpsd-doc 71 | gpsd-python 72 | gpsd 73 | graphite2-dev 74 | graphite2 75 | gst-plugins-base-dev 76 | gst-plugins-base 77 | gstreamer-dev 78 | gstreamer 79 | gtk2-dev 80 | gtk2 81 | harfbuzz-dev 82 | harfbuzz 83 | hostapd 84 | icu-dev 85 | icu 86 | imlib2 87 | ipv6-4.4.20-piCore_v7+ 88 | isl 89 | iw 90 | lapack 91 | libICE-dev 92 | libICE 93 | libSM-dev 94 | libSM 95 | libX11-dev 96 | libX11 97 | libXau-dev 98 | libXau 99 | libXcursor-dev 100 | libXcursor 101 | libXdamage-dev 102 | libXdamage 103 | libXdmcp-dev 104 | libXdmcp 105 | libXext-dev 106 | libXext 107 | libXfixes-dev 108 | libXfixes 109 | libXfont 110 | libXft-dev 111 | libXft 112 | libXi 113 | libXmu 114 | libXrender-dev 115 | libXrender 116 | libXt 117 | libXtst 118 | libacl 119 | libasound-dev 120 | libasound 121 | libattr 122 | libcap-dev 123 | libcap-ng-dev 124 | libcap-ng 125 | libcap 126 | libcroco 127 | libdrm-dev 128 | libdrm 129 | libedit 130 | libelf-dev 131 | libelf 132 | libevdev 133 | libevent 134 | libexif-dev 135 | libexif 136 | libfontenc 137 | libgcrypt-dev 138 | libgcrypt 139 | libgpg-error-dev 140 | libgpg-error 141 | libid3tag 142 | libidn 143 | libiw 144 | libjpeg-turbo-dev 145 | libjpeg-turbo 146 | liblzma-dev 147 | liblzma 148 | libnl 149 | libnotify-dev 150 | libnotify 151 | libogg-dev 152 | libogg 153 | libopus-dev 154 | libopus 155 | liborc-dev 156 | liborc 157 | libpciaccess 158 | libpng-dev 159 | libpng 160 | libpthread-stubs 161 | librsvg 162 | libssh2-dev 163 | libssh2 164 | libtasn1 165 | libtiff-dev 166 | libtiff 167 | libudev-dev 168 | libudev 169 | libunistring-dev 170 | libunistring 171 | libvorbis-dev 172 | libvorbis 173 | libxcb-dev 174 | libxcb 175 | libxkbfile 176 | libxml2-dev 177 | libxml2 178 | libxshmfence-dev 179 | libxshmfence 180 | linux-4.4.y_api_headers 181 | lzo-dev 182 | lzo 183 | m4 184 | make 185 | mesa-dev 186 | mesa 187 | mpc 188 | mpfr 189 | mtdev 190 | nano 191 | ncurses-dev 192 | ncurses-terminfo 193 | ncurses-utils 194 | ncurses 195 | nettle-dev 196 | nettle 197 | ntp 198 | openbox 199 | opencpn-watchdog_pi 200 | opencpn-weather_routing_pi 201 | opencpn 202 | openssh 203 | openssl-dev 204 | openssl 205 | p11-kit 206 | pango-dev 207 | pango 208 | pcre-dev 209 | pcre 210 | perl5 211 | pixman-dev 212 | pixman 213 | pkg-config 214 | portaudio-dev 215 | portaudio 216 | pypilot 217 | python-PIL 218 | python-RTIMULib 219 | python-click 220 | python-dev 221 | python-engineio 222 | python-flask 223 | python-flask_socketio 224 | python-gevent 225 | python-geventwebsocket 226 | python-greenlet 227 | python-itsdangerous 228 | python-jinja2 229 | python-markupsafe 230 | python-numpy 231 | python-pkg_resources 232 | python-scipy 233 | python-sdl2 234 | python-serial 235 | python-six 236 | python-socketio 237 | python-ugfx 238 | python-werkzeug 239 | python 240 | readline-dev 241 | readline 242 | rpi-vc 243 | runit 244 | scons 245 | screen 246 | setuptools 247 | sqlite3-dev 248 | sqlite3 249 | squashfs-tools 250 | startup-notification 251 | swig 252 | usb-serial-4.4.20-piCore_v7+ 253 | util-linux-dev 254 | util-linux 255 | util-macros 256 | watchdog 257 | wbar 258 | wifi 259 | wireless-4.4.20-piCore+ 260 | wireless-4.4.20-piCore_v7+ 261 | wireless_tools 262 | wpa_supplicant 263 | wxWidgets-dev 264 | wxWidgets-doc 265 | wxWidgets-locale 266 | wxWidgets 267 | x11vnc 268 | xcb-util 269 | xf86-input-evdev 270 | xf86-video-fbturbo 271 | xkbcomp 272 | xkeyboard-config 273 | xorg-fonts 274 | xorg-proto-dev 275 | xorg-server 276 | zlib_base-dev 277 | -------------------------------------------------------------------------------- /eepromutils/eepromutils.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | EXTNAM=eepromutils 14 | TMPDIR=/tmp/eepromutils 15 | 16 | DESTDIR=$TMPDIR/usr/local/bin 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | INITIALDIR=$PWD 23 | 24 | ###################################################### 25 | # Compile extension # 26 | ###################################################### 27 | 28 | # Export variables needed for compilation 29 | # Compile 30 | 31 | make 32 | 33 | mkdir -p $DESTDIR 34 | cp -v eepflash.sh eepmake $DESTDIR 35 | 36 | find $TMPDIR/ -type d | xargs chmod -v 755; 37 | 38 | # Strip executables 39 | 40 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 41 | 42 | ################################################### 43 | # Create base extension in temp dir # 44 | ################################################### 45 | 46 | cd $TMPDIR 47 | cd .. 48 | mksquashfs $TMPDIR $EXTNAM.tcz 49 | cd $TMPDIR 50 | find usr -not -type d > $EXTNAM.tcz.list 51 | mv ../$EXTNAM.tcz . 52 | 53 | # Create md5 file 54 | 55 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 56 | 57 | 58 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 59 | 60 | 61 | -------------------------------------------------------------------------------- /emacs/emacs.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | # Export variables needed for compilation 10 | 11 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 12 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 13 | 14 | # Configure it 15 | 16 | SRCNAM=emacs.tar.xz 17 | WRKDIR=emacs 18 | EXTNAM=emacs 19 | TMPDIR=/tmp/emacs 20 | 21 | ###################################################### 22 | # Prepare extension creation # 23 | ###################################################### 24 | 25 | INITIALDIR=$PWD 26 | 27 | # Remove dirs and files left from previous creation 28 | 29 | #rm -r -f $WRKDIR 30 | rm -r -f $TMPDIR 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Export variables needed for compilation 41 | 42 | tar -xf $SRCNAM 43 | 44 | # Configure it 45 | 46 | cd $WRKDIR 47 | 48 | ./autogen.sh 49 | ./configure --without-all 50 | 51 | # Compile 52 | 53 | make 54 | 55 | # Install in base temp dir 56 | 57 | make DESTDIR=$TMPDIR install 58 | 59 | # Delete compilation work directory 60 | 61 | cd .. 62 | rm -r -f $WRKDIR 63 | 64 | # Adjust directory access rigths 65 | find $TMPDIR/ -type d | xargs chmod -v 755; 66 | 67 | # Strip executables 68 | 69 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 70 | 71 | ################################################### 72 | # Create base extension in temp dir # 73 | ################################################### 74 | 75 | cd $TMPDIR 76 | cd .. 77 | mksquashfs $TMPDIR $EXTNAM.tcz 78 | cd $TMPDIR 79 | find usr -not -type d > $EXTNAM.tcz.list 80 | mv ../$EXTNAM.tcz . 81 | 82 | # Create md5 file 83 | 84 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 85 | 86 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 87 | 88 | # Cleanup temp directory 89 | 90 | rm -rf * 91 | 92 | cd $INITIALDIR 93 | -------------------------------------------------------------------------------- /gpsd/60-gpsd.rules: -------------------------------------------------------------------------------- 1 | 2 | # udev rules for gpsd 3 | # $Id$ 4 | # 5 | # GPSes don't have their own USB device class. They're serial-over-USB 6 | # devices, so what you see is actually the ID of the serial-over-USB chip. 7 | # Fortunately, just two of these account for over 80% of consumer-grade 8 | # GPS sensors. The gpsd.hotplug.wrapper script will tell a running gpsd 9 | # that it should look at the device that just went active, because it 10 | # might be a GPS. 11 | # 12 | # The following setup works on Debian - something similar will apply on 13 | # other distributions: 14 | # 15 | # /etc/udev/gpsd.rules 16 | # /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules 17 | # /lib/udev/gpsd.hotplug.wrapper 18 | # /lib/udev/gpsd.hotplug 19 | # 20 | # Setting the link in /etc/udev/rules.d activates the rule and determines 21 | # when to run it on boot (similar to init.d processing). 22 | 23 | SUBSYSTEM!="tty", GOTO="gpsd_rules_end" 24 | 25 | # Prolific Technology, Inc. PL2303 Serial Port 26 | ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 27 | # ATEN International Co., Ltd UC-232A Serial Port [pl2303] 28 | ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 29 | # FTDI 8U232AM 30 | ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 31 | # Cypress M8/CY7C64013 (DeLorme uses these) 32 | ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 33 | # PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) 34 | ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 35 | # Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) 36 | ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 37 | # Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) 38 | ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 39 | # u-blox AG, u-blox 5 (tested with Navilock NL-402U) 40 | ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 41 | # FTDI FT232 42 | ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 43 | # u-blox 4 44 | ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" 45 | 46 | RUN+="/lib/udev/gpsd.hotplug.wrapper" 47 | 48 | LABEL="gpsd_rules_end" 49 | -------------------------------------------------------------------------------- /gpsd/gpsd.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | # Export variables needed for compilation 10 | 11 | 12 | PYTHON=python`cat /opt/python` 13 | 14 | # Configure it 15 | 16 | WRKDIR=gpsd-3.20 17 | SRCNAM=$WRKDIR.tar.xz 18 | EXTNAM=gpsd 19 | TMPDIR=/tmp 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | wget -c http://download-mirror.savannah.gnu.org/releases/gpsd/$SRCNAM 23 | 24 | ###################################################### 25 | # Prepare extension creation # 26 | ###################################################### 27 | 28 | INITIALDIR=$PWD 29 | 30 | # Remove dirs and files left from previous creation 31 | 32 | #rm -r -f $WRKDIR 33 | 34 | rm -r -f $TMPDIR/$EXTNAM 35 | 36 | # Create temporary directory 37 | 38 | mkdir -p $TMPDIR/$EXTNAM/usr/local 39 | 40 | ###################################################### 41 | # Compile extension # 42 | ###################################################### 43 | 44 | # Export variables needed for compilation 45 | 46 | tar -xf $SRCNAM 47 | 48 | # Configure it 49 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 50 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 51 | 52 | cd $WRKDIR 53 | 54 | # Compile 55 | # Install in base temp dir 56 | ln -s `which $PYTHON` python 57 | PATH=.:$PATH 58 | sudo scons prefix=$TMPDIR/$EXTNAM/usr/local install 59 | 60 | # Delete compilation work directory 61 | 62 | cd .. 63 | rm -rf $WRKDIR 64 | 65 | # Adjust directory access rigths 66 | sudo chown -R tc $TMPDIR/$EXTNAM 67 | find $TMPDIR/$EXTNAM/ -type d | xargs chmod -v 755; 68 | 69 | # Strip executables 70 | find $TMPDIR/$EXTNAM | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 71 | 72 | # Move files to doc extension 73 | 74 | mkdir -p $TMPDIR/$EXTNAM-doc/usr/local/share 75 | mv $TMPDIR/$EXTNAM/usr/local/share/man $TMPDIR/$EXTNAM-doc/usr/local/share 76 | mv $TMPDIR/$EXTNAM/usr/local/share/info $TMPDIR/$EXTNAM-doc/usr/local/share 77 | 78 | # Move files to dev extension 79 | 80 | #mkdir -p $TMPDIR/$EXTNAM-dev/usr/local/lib 81 | #mv $TMPDIR/$EXTNAM/usr/local/lib/*.a $TMPDIR/$EXTNAM-dev/usr/local/lib 82 | #mv $TMPDIR/$EXTNAM/usr/local/lib/*.la $TMPDIR/$EXTNAM-dev/usr/local/lib 83 | #mv $TMPDIR/$EXTNAM/usr/local/lib/pkgconfig $TMPDIR/$EXTNAM-dev/usr/local/lib 84 | #mv $TMPDIR/$EXTNAM/usr/local/include $TMPDIR/$EXTNAM-dev/usr/local 85 | 86 | 87 | mkdir -p $TMPDIR/$PYTHON-$EXTNAM/$PYTDIR 88 | cp -rv $PYTDIR/gps* $TMPDIR/$PYTHON-$EXTNAM/$PYTDIR 89 | 90 | # Delete *.pyc files 91 | 92 | find $TMPDIR/$PYTHON-$EXTNAM -name *.pyc | xargs rm -r 93 | 94 | # Adjust directory access rigths 95 | 96 | find $PYTHON-$TMPDIR/$PYTHON-$EXTNAM -type d | xargs chmod -v 755; 97 | 98 | 99 | ################################################### 100 | # Create base extension in temp dir # 101 | ################################################### 102 | 103 | cd $TMPDIR/$EXTNAM 104 | cd .. 105 | mksquashfs $TMPDIR/$EXTNAM $EXTNAM.tcz 106 | cd $TMPDIR/$EXTNAM 107 | find usr -not -type d > $EXTNAM.tcz.list 108 | mv ../$EXTNAM.tcz . 109 | 110 | # Create md5 file 111 | 112 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 113 | 114 | cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 115 | 116 | # Cleanup temp directory 117 | 118 | rm -rf * 119 | 120 | ################################################### 121 | # Create doc extension in temp dir # 122 | ################################################### 123 | 124 | cd $TMPDIR/$EXTNAM-doc 125 | cd .. 126 | mksquashfs $TMPDIR/$EXTNAM-doc $EXTNAM-doc.tcz 127 | cd $TMPDIR/$EXTNAM-doc 128 | find usr -not -type d > $EXTNAM-doc.tcz.list 129 | mv ../$EXTNAM-doc.tcz . 130 | 131 | # Create md5 file 132 | 133 | md5sum $EXTNAM-doc.tcz > $EXTNAM-doc.tcz.md5.txt 134 | 135 | cp -v $EXTNAM-doc.tcz* /mnt/mmcblk0p2/tce/optional 136 | 137 | # Cleanup temp directory 138 | 139 | rm -rf * 140 | 141 | ################################################### 142 | # Create dev extension in temp dir # 143 | ################################################### 144 | 145 | #cd $TMPDIR/$EXTNAM-dev 146 | #cd .. 147 | #mksquashfs $TMPDIR/$EXTNAM-dev $EXTNAM-dev.tcz 148 | #cd $TMPDIR/$EXTNAM-dev 149 | #find usr -not -type d > $EXTNAM-dev.tcz.list 150 | #mv ../$EXTNAM-dev.tcz . 151 | 152 | # Create md5 file 153 | 154 | #md5sum $EXTNAM-dev.tcz > $EXTNAM-dev.tcz.md5.txt 155 | 156 | #sudo cp -v $EXTNAM-dev.tcz* /mnt/mmcblk0p2/tce/optional 157 | 158 | # Cleanup temp directory 159 | 160 | #rm -rf * 161 | 162 | 163 | ################################################### 164 | # Create python extension in temp dir # 165 | ################################################### 166 | 167 | cd $TMPDIR/$PYTHON-$EXTNAM 168 | cd .. 169 | mksquashfs $TMPDIR/$PYTHON-$EXTNAM $PYTHON-$EXTNAM.tcz 170 | cd $TMPDIR/$PYTHON-$EXTNAM 171 | find usr -not -type d > $PYTHON-$EXTNAM.tcz.list 172 | mv ../$PYTHON-$EXTNAM.tcz . 173 | 174 | # Create md5 file 175 | 176 | md5sum $PYTHON-$EXTNAM.tcz > $PYTHON-$EXTNAM.tcz.md5.txt 177 | 178 | cp -v $PYTHON-$EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 179 | 180 | # Cleanup temp directory 181 | 182 | rm -r -f * 183 | 184 | cd $INITIALDIR 185 | 186 | -------------------------------------------------------------------------------- /modules/copy_modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | KERNEL=4.9.22 4 | 5 | cp -v lib/modules/$KERNEL-piCore/kernel/drivers/media/rc/rc-core.ko modules 6 | cp -v lib/modules/$KERNEL-piCore/kernel/drivers/media/rc/lirc_dev.ko modules 7 | cp -v lib/modules/$KERNEL-piCore/kernel/drivers/staging/media/lirc/lirc_rpi.ko modules 8 | 9 | cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/media/rc/rc-core.ko v7_modules 10 | cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/media/rc/lirc_dev.ko v7_modules 11 | cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/staging/media/lirc/lirc_rpi.ko v7_modules 12 | -------------------------------------------------------------------------------- /mydata.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypilot/tinypilot/428002fbbba50be9d23e53f566e310292fe02d65/mydata.tgz -------------------------------------------------------------------------------- /opencpn/opencpn.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=OpenCPN.tar.gz 14 | WRKDIR=OpenCPN 15 | EXTNAM=opencpn 16 | TMPDIR=/tmp/opencpn 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | INITIALDIR=$PWD 23 | 24 | # Remove dirs and files left from previous creation 25 | 26 | #rm -rf $WRKDIR 27 | rm -rf $TMPDIR 28 | 29 | # Create temporary directory 30 | 31 | mkdir -p $TMPDIR 32 | 33 | ###################################################### 34 | # Compile extension # 35 | ###################################################### 36 | 37 | # Export variables needed for compilation 38 | 39 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 40 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 41 | #export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 42 | 43 | # Unpack source in current directory 44 | 45 | tar -xf $SRCNAM 46 | 47 | # Configure it 48 | 49 | cd $WRKDIR 50 | mkdir build 51 | cd build 52 | cmake .. 53 | 54 | # Compile 55 | 56 | make 57 | 58 | # Install in base temp dir 59 | 60 | make DESTDIR=$TMPDIR install 61 | 62 | # Delete compilation work directory 63 | 64 | cd ../.. 65 | 66 | 67 | rm -r -f $WRKDIR 68 | 69 | # copy opencpn files 70 | #for i in `find /usr/local | grep opencpn`; cp $i $TMPDIR$i 71 | 72 | # Adjust directory access rigths 73 | 74 | find $TMPDIR/ -type d | xargs chmod -v 755; 75 | 76 | # Strip executables 77 | 78 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 79 | 80 | ################################################### 81 | # Create base extension in temp dir # 82 | ################################################### 83 | 84 | cd $TMPDIR 85 | cd .. 86 | mksquashfs $TMPDIR $EXTNAM.tcz 87 | cd $TMPDIR 88 | find usr -not -type d > $EXTNAM.tcz.list 89 | mv ../$EXTNAM.tcz . 90 | 91 | # Create md5 file 92 | 93 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 94 | 95 | 96 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 97 | 98 | # Cleanup temp directory 99 | 100 | rm -rf * 101 | 102 | cd $INITIALDIR 103 | -------------------------------------------------------------------------------- /opencpn/plugins/watchdog_pi.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | WRKDIR=watchdog_pi 14 | 15 | SRCNAM=$WRKDIR.tar.gz 16 | EXTNAM=opencpn-$WRKDIR 17 | TMPDIR=/tmp/$WRKDIR 18 | 19 | ###################################################### 20 | # Prepare extension creation # 21 | ###################################################### 22 | 23 | INITIALDIR=$PWD 24 | 25 | # Remove dirs and files left from previous creation 26 | 27 | #rm -rf $WRKDIR 28 | rm -rf $TMPDIR 29 | 30 | # Create temporary directory 31 | 32 | mkdir -p $TMPDIR 33 | 34 | ###################################################### 35 | # Compile extension # 36 | ###################################################### 37 | 38 | # Export variables needed for compilation 39 | 40 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 41 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 42 | #export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 43 | 44 | # Unpack source in current directory 45 | 46 | tar -xf $SRCNAM 47 | 48 | # Configure it 49 | 50 | cd $WRKDIR 51 | mkdir build 52 | cd build 53 | cmake .. 54 | 55 | # Compile 56 | 57 | make 58 | 59 | # Install in base temp dir 60 | 61 | make DESTDIR=$TMPDIR install 62 | 63 | # Delete compilation work directory 64 | 65 | cd ../.. 66 | rm -r -f $WRKDIR 67 | 68 | # copy opencpn files 69 | #for i in `find /usr/local | grep opencpn`; cp $i $TMPDIR$i 70 | 71 | # Adjust directory access rigths 72 | 73 | find $TMPDIR/ -type d | xargs chmod -v 755; 74 | 75 | # Strip executables 76 | 77 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 78 | 79 | ################################################### 80 | # Create base extension in temp dir # 81 | ################################################### 82 | 83 | cd $TMPDIR 84 | cd .. 85 | mksquashfs $TMPDIR $EXTNAM.tcz 86 | cd $TMPDIR 87 | find usr -not -type d > $EXTNAM.tcz.list 88 | mv ../$EXTNAM.tcz . 89 | 90 | # Create md5 file 91 | 92 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 93 | 94 | 95 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 96 | 97 | # Cleanup temp directory 98 | 99 | rm -rf * 100 | 101 | cd $INITIALDIR 102 | -------------------------------------------------------------------------------- /opencpn/plugins/weather_routing_pi.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | WRKDIR=weather_routing_pi 14 | 15 | SRCNAM=$WRKDIR.tar.gz 16 | EXTNAM=opencpn-$WRKDIR 17 | TMPDIR=/tmp/$WRKDIR 18 | 19 | ###################################################### 20 | # Prepare extension creation # 21 | ###################################################### 22 | 23 | INITIALDIR=$PWD 24 | 25 | # Remove dirs and files left from previous creation 26 | 27 | #rm -rf $WRKDIR 28 | rm -rf $TMPDIR 29 | 30 | # Create temporary directory 31 | 32 | mkdir -p $TMPDIR 33 | 34 | ###################################################### 35 | # Compile extension # 36 | ###################################################### 37 | 38 | # Export variables needed for compilation 39 | 40 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 41 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 42 | #export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 43 | 44 | # Unpack source in current directory 45 | 46 | tar -xf $SRCNAM 47 | 48 | # Configure it 49 | 50 | cd $WRKDIR 51 | mkdir build 52 | cd build 53 | cmake .. 54 | 55 | # Compile 56 | 57 | make 58 | 59 | # Install in base temp dir 60 | 61 | make DESTDIR=$TMPDIR install 62 | 63 | # Delete compilation work directory 64 | 65 | cd ../.. 66 | rm -r -f $WRKDIR 67 | 68 | # copy opencpn files 69 | #for i in `find /usr/local | grep opencpn`; cp $i $TMPDIR$i 70 | 71 | # Adjust directory access rigths 72 | 73 | find $TMPDIR/ -type d | xargs chmod -v 755; 74 | 75 | # Strip executables 76 | 77 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 78 | 79 | ################################################### 80 | # Create base extension in temp dir # 81 | ################################################### 82 | 83 | cd $TMPDIR 84 | cd .. 85 | mksquashfs $TMPDIR $EXTNAM.tcz 86 | cd $TMPDIR 87 | find usr -not -type d > $EXTNAM.tcz.list 88 | mv ../$EXTNAM.tcz . 89 | 90 | # Create md5 file 91 | 92 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 93 | 94 | 95 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 96 | 97 | # Cleanup temp directory 98 | 99 | rm -rf * 100 | 101 | cd $INITIALDIR 102 | -------------------------------------------------------------------------------- /packages: -------------------------------------------------------------------------------- 1 | Xlibs 2 | Xorg 3 | Xprogs 4 | acl 5 | alsa-modules-4.4.20-piCore_v7+ 6 | alsa-utils 7 | alsa 8 | aterm 9 | atk 10 | attr 11 | blas 12 | bzip2-lib 13 | bzip2 14 | cairo 15 | cpufrequtils 16 | curl 17 | dillo3 18 | dnsmasq 19 | emacs 20 | expat2 21 | file 22 | firmware-atheros 23 | firmware-ralinkwifi 24 | firmware-rpi3-wireless 25 | firmware-rtlwifi 26 | flex 27 | fltk-1.3 28 | flwm_topside 29 | fontconfig 30 | freetype 31 | gamin 32 | gdk-pixbuf 33 | giflib 34 | glib2 35 | glu 36 | gmp 37 | gnutls 38 | gpsd-python 39 | gpsd 40 | graphite2 41 | gst-plugins-base 42 | gstreamer 43 | gtk2 44 | harfbuzz 45 | hostapd 46 | icu 47 | imlib2 48 | ipv6-4.4.20-piCore_v7+ 49 | isl 50 | iw 51 | lapack 52 | libICE 53 | libSM 54 | libX11 55 | libXau 56 | libXcursor 57 | libXdamage 58 | libXdmcp 59 | libXext 60 | libXfixes 61 | libXfont 62 | libXft 63 | libXi 64 | libXmu 65 | libXrender 66 | libXt 67 | libXtst 68 | libacl 69 | libasound 70 | libattr 71 | libcap-ng 72 | libcap 73 | libcroco 74 | libdrm 75 | libedit 76 | libelf 77 | libevent 78 | libexif 79 | libfontenc 80 | libgcrypt 81 | libgpg-error 82 | libid3tag 83 | libidn 84 | libiw 85 | libjpeg-turbo 86 | liblzma 87 | libnl 88 | libnotify 89 | libogg 90 | libopus 91 | liborc 92 | libpciaccess 93 | libpng 94 | libpthread-stubs 95 | librsvg 96 | libssh2 97 | libtasn1 98 | libtiff 99 | libunistring 100 | libvorbis 101 | libxcb 102 | libxkbfile 103 | libxml2 104 | libxshmfence 105 | linux-4.4.y_api_headers 106 | lzo 107 | mesa 108 | mpc 109 | mpfr 110 | nano 111 | ncurses-terminfo 112 | ncurses-utils 113 | ncurses 114 | nettle 115 | ntp 116 | openbox 117 | opencpn-watchdog_pi 118 | opencpn-weather_routing_pi 119 | opencpn 120 | openssh 121 | openssl 122 | p11-kit 123 | pango 124 | pcre 125 | perl5 126 | pixman 127 | pkg-config 128 | portaudio 129 | pypilot 130 | python-PIL 131 | python-RTIMULib 132 | python-click 133 | python-engineio 134 | python-flask 135 | python-flask_socketio 136 | python-gevent 137 | python-geventwebsocket 138 | python-greenlet 139 | python-itsdangerous 140 | python-jinja2 141 | python-markupsafe 142 | python-numpy 143 | python-pkg_resources 144 | python-scipy 145 | python-sdl2 146 | python-serial 147 | python-six 148 | python-socketio 149 | python-ugfx 150 | python-werkzeug 151 | python 152 | readline 153 | runit 154 | sqlite3 155 | startup-notification 156 | usb-serial-4.4.20-piCore_v7+ 157 | util-linux 158 | util-macros 159 | watchdog 160 | wbar 161 | wifi 162 | wireless-4.4.20-piCore+ 163 | wireless-4.4.20-piCore_v7+ 164 | wireless_tools 165 | wpa_supplicant 166 | wxWidgets 167 | xcb-util 168 | xf86-video-fbturbo 169 | xkbcomp 170 | xkeyboard-config 171 | xorg-fonts 172 | xorg-server 173 | -------------------------------------------------------------------------------- /portaudio/portaudio.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=pa_stable_v190600_20161030.tgz 14 | WRKDIR=portaudio 15 | EXTNAM=portaudio 16 | TMPDIR=/tmp/portaudio 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | INITIALDIR=$PWD 23 | 24 | # Remove dirs and files left from previous creation 25 | 26 | rm -r -f $WRKDIR 27 | 28 | rm -r -f $TMPDIR 29 | 30 | # Crete temporary directory 31 | 32 | mkdir -p $TMPDIR 33 | 34 | ###################################################### 35 | # Compile extension # 36 | ###################################################### 37 | 38 | # Export variables needed for compilation 39 | 40 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 41 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 42 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 43 | 44 | # Unpack source in current directory 45 | 46 | tar -xf $SRCNAM 47 | 48 | # Configure it 49 | 50 | cd $WRKDIR 51 | ./configure --prefix=/usr/local --enable-shared --disable-python 52 | 53 | # Compile 54 | 55 | make -j2 56 | 57 | # Install in base temp dir 58 | 59 | make install DESTDIR=$TMPDIR 60 | 61 | # Delete compilation work directory 62 | 63 | cd .. 64 | rm -r -f $WRKDIR 65 | 66 | # Adjust directory access rigths 67 | 68 | find $TMPDIR/ -type d | xargs chmod -v 755; 69 | 70 | # Strip executables 71 | 72 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 73 | 74 | # Move files to dev extension 75 | 76 | mkdir -p $TMPDIR-dev/usr/local/lib 77 | mv $TMPDIR/usr/local/include $TMPDIR-dev/usr/local 78 | mv $TMPDIR/usr/local/lib/*.a $TMPDIR-dev/usr/local/lib 79 | mv $TMPDIR/usr/local/lib/*.la $TMPDIR-dev/usr/local/lib 80 | mv $TMPDIR/usr/local/lib/pkgconfig $TMPDIR-dev/usr/local/lib 81 | 82 | ################################################### 83 | # Create base extension in temp dir # 84 | ################################################### 85 | 86 | cd $TMPDIR 87 | cd .. 88 | mksquashfs $TMPDIR $EXTNAM.tcz 89 | cd $TMPDIR 90 | find usr -not -type d > $EXTNAM.tcz.list 91 | mv ../$EXTNAM.tcz . 92 | 93 | # Create md5 file 94 | 95 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 96 | 97 | sudo cp -v $EXTNAM.tcz /mnt/mmcblk0p2/tce/optional 98 | 99 | # Cleanup temp directory 100 | 101 | rm -rf * 102 | 103 | 104 | ################################################### 105 | # Create dev extension in temp dir # 106 | ################################################### 107 | 108 | cd $TMPDIR-dev 109 | cd .. 110 | mksquashfs $TMPDIR-dev $EXTNAM-dev.tcz 111 | cd $TMPDIR-dev 112 | find usr -not -type d > $EXTNAM-dev.tcz.list 113 | mv ../$EXTNAM-dev.tcz . 114 | 115 | # Create md5 file 116 | 117 | md5sum $EXTNAM-dev.tcz > $EXTNAM-dev.tcz.md5.txt 118 | 119 | sudo cp -v $EXTNAM-dev.tcz /mnt/mmcblk0p2/tce/optional 120 | 121 | rm -rf * 122 | 123 | cd $INITIALDIR 124 | -------------------------------------------------------------------------------- /pypilot_dependencies/README: -------------------------------------------------------------------------------- 1 | python3.6 get-pip.py --trusted-host pypi.org --trusted-host files.pythonhosted.org 2 | -------------------------------------------------------------------------------- /pypilot_dependencies/avrdude/avrdude.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | EXTNAM=avrdude 14 | WRKDIR=avrdude/avrdude 15 | TMPDIR=/tmp/$EXTNAM 16 | 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | # Remove dirs and files left from previous creation 23 | 24 | rm -r -f $TMPDIR 25 | 26 | # Create temporary directory 27 | 28 | mkdir -p $TMPDIR 29 | 30 | ###################################################### 31 | # Compile extension # 32 | ###################################################### 33 | 34 | INITIALDIR=$PWD 35 | 36 | # Export variables needed for compilation 37 | 38 | 39 | # Configure it 40 | 41 | cd $WRKDIR 42 | 43 | # Compile 44 | ./configure 45 | make 46 | make DESTDIR=$TMPDIR install 47 | 48 | # Adjust directory access rigths 49 | 50 | find $TMPDIR/ -type d | xargs chmod -v 755; 51 | 52 | # Strip executables 53 | 54 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 55 | 56 | ################################################### 57 | # Create base extension in temp dir # 58 | ################################################### 59 | 60 | cd $TMPDIR 61 | cd .. 62 | mksquashfs $TMPDIR $EXTNAM.tcz 63 | cd $TMPDIR 64 | find usr -not -type d > $EXTNAM.tcz.list 65 | mv ../$EXTNAM.tcz . 66 | 67 | # Create md5 file 68 | 69 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 70 | 71 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 72 | 73 | cd $INITIALDIR 74 | -------------------------------------------------------------------------------- /pypilot_dependencies/blas/blas.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=blas-3.5.0.tar.gz 14 | WRKDIR=BLAS-3.5.0 15 | EXTNAM=blas 16 | TMPDIR=/tmp/blas 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | # Remove dirs and files left from previous creation 23 | 24 | rm -r -f $WRKDIR 25 | 26 | rm -r -f $TMPDIR 27 | 28 | # Create temporary directory 29 | 30 | mkdir -p $TMPDIR 31 | 32 | ###################################################### 33 | # Compile extension # 34 | ###################################################### 35 | 36 | INITIALDIR=$PWD 37 | 38 | # Export variables needed for compilation 39 | 40 | tar -xf $SRCNAM 41 | 42 | # Configure it 43 | 44 | cd $WRKDIR 45 | 46 | # Compile 47 | 48 | make 49 | 50 | # Install in base temp dir 51 | 52 | mkdir -p $TMPDIR/usr/lib 53 | cp blas*.a $TMPDIR/usr/lib/libblas.a 54 | 55 | # Delete compilation work directory 56 | 57 | cd .. 58 | rm -r -f $WRKDIR 59 | 60 | # Adjust directory access rigths 61 | 62 | find $TMPDIR/ -type d | xargs chmod -v 755; 63 | 64 | # Strip executables 65 | 66 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 67 | 68 | ################################################### 69 | # Create base extension in temp dir # 70 | ################################################### 71 | 72 | cd $TMPDIR 73 | cd .. 74 | mksquashfs $TMPDIR $EXTNAM.tcz 75 | cd $TMPDIR 76 | find usr -not -type d > $EXTNAM.tcz.list 77 | mv ../$EXTNAM.tcz . 78 | 79 | # Create md5 file 80 | 81 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 82 | 83 | cp -fv $EXTNAM.tcz /mnt/mmcblk0p2/tce/optional 84 | 85 | cd $INITIALDIR 86 | -------------------------------------------------------------------------------- /pypilot_dependencies/hat/RPi.GPIO.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | PYTHON=`cat /opt/python` 16 | 17 | 18 | WRKDIR=RPi.GPIO-0.7.0 19 | SRCNAM=$WRKDIR.tar.gz 20 | EXTNAM=$PYTHON-RPi.GPIO 21 | TMPDIR=/tmp/$PYTHON-RPi.GPIO 22 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 23 | 24 | wget -c https://files.pythonhosted.org/packages/cb/88/d3817eb11fc77a8d9a63abeab8fe303266b1e3b85e2952238f0da43fed4e/$SRCNAM 25 | 26 | ###################################################### 27 | # Prepare extension creation # 28 | ###################################################### 29 | 30 | # Remove dirs and files left from previous creation 31 | 32 | rm -r -f $PYTDIR/$EXTNAM*.egg 33 | 34 | # Create temporary directory 35 | 36 | mkdir -p $TMPDIR/$PYTDIR 37 | 38 | ###################################################### 39 | # Compile extension # 40 | ###################################################### 41 | 42 | INITIALDIR=$PWD 43 | 44 | # Export variables needed for compilation 45 | 46 | export CFLAGS="-Os -pipe" 47 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 48 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 49 | 50 | # Unpack source in current directory 51 | 52 | tar -xf $SRCNAM 53 | 54 | # Configure it 55 | 56 | cd $WRKDIR 57 | 58 | # Install in place 59 | 60 | sudo $PYTHON setup.py install 61 | 62 | # Delete compilation work directory 63 | 64 | cd .. 65 | sudo rm -rf $WRKDIR 66 | 67 | # Move files to tmp dir 68 | 69 | mkdir -p $TMPDIR/$PYTDIR 70 | cp -rv $PYTDIR/RPi* $TMPDIR/$PYTDIR 71 | 72 | # Delete *.pyc files 73 | 74 | find $TMPDIR/ -name *.pyc | xargs rm -r 75 | 76 | # Adjust directory access rigths 77 | 78 | find $TMPDIR/ -type d | xargs chmod -v 755; 79 | 80 | # Strip executables 81 | 82 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 83 | 84 | ################################################### 85 | # Create base extension in temp dir # 86 | ################################################### 87 | 88 | cd $TMPDIR 89 | cd .. 90 | mksquashfs $TMPDIR $EXTNAM.tcz 91 | cd $TMPDIR 92 | find usr -not -type d > $EXTNAM.tcz.list 93 | mv ../$EXTNAM.tcz . 94 | 95 | # Create md5 file 96 | 97 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 98 | 99 | sudo cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 100 | 101 | # Cleanup temp directory 102 | 103 | rm -rf * 104 | 105 | cd $INITIALDIR 106 | -------------------------------------------------------------------------------- /pypilot_dependencies/hat/python-PIL/python-PIL.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=PIL 15 | NAM=Pillow-3.4.0 16 | #NAM=Pillow-7.2.0 17 | 18 | PYTHON=python`cat /opt/python` 19 | EXTNAM=$PYTHON-$PYNAM 20 | TMPDIR=/tmp/$PYTHON-$NAM 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | INITIALDIR=$PWD 28 | 29 | # Remove dirs and files left from previous creation 30 | 31 | # Create temporary directory 32 | 33 | mkdir -p $TMPDIR$PYTDIR 34 | 35 | ###################################################### 36 | # Compile extension # 37 | ###################################################### 38 | 39 | # Install in place 40 | 41 | #sudo pip3.6 install $PYNAM 42 | tar zxvf $NAM*tar.gz 43 | cd $NAM* 44 | sudo $PYTHON setup.py install 45 | 46 | # Move files to tmp dir 47 | 48 | cp -rf $PYTDIR/$PYNAM $TMPDIR$PYTDIR 49 | 50 | # Delete *.pyc files 51 | 52 | find $TMPDIR/ -name *.pyc | xargs rm -r 53 | 54 | # Adjust directory access rigths 55 | 56 | find $TMPDIR/ -type d | xargs chmod -v 755; 57 | 58 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 59 | 60 | 61 | ################################################### 62 | # Create base extension in temp dir # 63 | ################################################### 64 | 65 | cd $TMPDIR 66 | cd .. 67 | mksquashfs $TMPDIR $EXTNAM.tcz 68 | cd $TMPDIR 69 | find usr -not -type d > $EXTNAM.tcz.list 70 | mv -f ../$EXTNAM.tcz . 71 | 72 | # Create md5 file 73 | 74 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 75 | 76 | # copy extension files 77 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 78 | 79 | # Cleanup temp directory 80 | 81 | rm -rf * 82 | 83 | cd $INITIALDIR 84 | -------------------------------------------------------------------------------- /pypilot_dependencies/hat/wiringPi.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | SRCNAM=wiringPi.tar.gz 16 | WRKDIR=wiringPi 17 | EXTNAM=wiringPi 18 | 19 | TMPDIR=/tmp/$EXTNAM 20 | 21 | ###################################################### 22 | # Prepare extension creation # 23 | ###################################################### 24 | 25 | INITIALDIR=$PWD 26 | 27 | # Remove dirs and files left from previous creation 28 | 29 | #rm -r -f $PYTDIR/$WRKDIR*.egg 30 | 31 | # Create temporary directory 32 | 33 | rm -r -f $TMPDIR 34 | mkdir -p $TMPDIR/lib 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Export variables needed for compilation 41 | 42 | export CFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 43 | export CXXFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 44 | 45 | # Unpack source in current directory 46 | 47 | tar -xf $SRCNAM 48 | 49 | # Configure it 50 | 51 | # Build and Install 52 | cd $WRKDIR 53 | 54 | cd wiringPi 55 | make DESTDIR=$TMPDIR install 56 | cd ../devLib 57 | make DESTDIR=$TMPDIR install 58 | 59 | cd ../gpio 60 | make DESTDIR=$TMPDIR install 61 | 62 | cd ../.. 63 | rm -r -f $WRKDIR 64 | 65 | # Adjust directory access rigths 66 | 67 | find $TMPDIR/ -type d | xargs chmod -v 755; 68 | 69 | ################################################### 70 | # Create base extension in temp dir # 71 | ################################################### 72 | 73 | cd $TMPDIR 74 | cd .. 75 | mksquashfs $TMPDIR $EXTNAM.tcz 76 | cd $TMPDIR 77 | find usr -not -type d > $EXTNAM.tcz.list 78 | mv ../$EXTNAM.tcz . 79 | 80 | # Create md5 file 81 | 82 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 83 | 84 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 85 | 86 | # Cleanup temp directory 87 | 88 | rm -rf * 89 | 90 | cd $INITIALDIR 91 | -------------------------------------------------------------------------------- /pypilot_dependencies/lapack/lapack.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=lapack-3.1.1.tgz 14 | WRKDIR=lapack-3.1.1 15 | EXTNAM=lapack 16 | TMPDIR=/tmp/lapack 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | # Remove dirs and files left from previous creation 23 | 24 | rm -r -f $WRKDIR 25 | 26 | rm -r -f $TMPDIR 27 | 28 | # Create temporary directory 29 | 30 | mkdir -p $TMPDIR 31 | 32 | ###################################################### 33 | # Compile extension # 34 | ###################################################### 35 | 36 | INITIALDIR=$PWD 37 | 38 | # Export variables needed for compilation 39 | 40 | tar -xf $SRCNAM 41 | 42 | # Configure it 43 | 44 | cd $WRKDIR 45 | cp INSTALL/make.inc.gfortran make.inc 46 | 47 | # Compile 48 | 49 | make 50 | 51 | # Install in base temp dir 52 | 53 | mkdir -p $TMPDIR/usr/lib 54 | cp lapack*.a $TMPDIR/usr/lib/liblapack.a 55 | 56 | # Delete compilation work directory 57 | 58 | cd .. 59 | rm -r -f $WRKDIR 60 | 61 | # Adjust directory access rigths 62 | 63 | find $TMPDIR/ -type d | xargs chmod -v 755; 64 | 65 | # Strip executables 66 | 67 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 68 | 69 | ################################################### 70 | # Create base extension in temp dir # 71 | ################################################### 72 | 73 | cd $TMPDIR 74 | cd .. 75 | mksquashfs $TMPDIR $EXTNAM.tcz 76 | cd $TMPDIR 77 | find usr -not -type d > $EXTNAM.tcz.list 78 | mv ../$EXTNAM.tcz . 79 | 80 | # Create md5 file 81 | 82 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 83 | 84 | cp -fv $EXTNAM.tcz /mnt/mmcblk0p2/tce/optional 85 | 86 | cd $INITIALDIR 87 | -------------------------------------------------------------------------------- /pypilot_dependencies/lirc/lirc.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=lirc-0.10.0.tar.bz2 14 | WRKDIR=lirc-0.10.0 15 | EXTNAM=lirc 16 | TMPDIR=/tmp/lirc 17 | 18 | ###################################################### 19 | # Prepare extension creation # 20 | ###################################################### 21 | 22 | # Remove dirs and files left from previous creation 23 | 24 | rm -r -f $WRKDIR 25 | 26 | rm -r -f $TMPDIR 27 | 28 | # Create temporary directory 29 | 30 | mkdir -p $TMPDIR 31 | 32 | ###################################################### 33 | # Compile extension # 34 | ###################################################### 35 | 36 | INITIALDIR=$PWD 37 | 38 | # Export variables needed for compilation 39 | 40 | tar -xf $SRCNAM 41 | 42 | # Configure it 43 | 44 | cd $WRKDIR 45 | 46 | # Compile 47 | 48 | tce-load -i bash automake autoconf libtool m4 49 | sudo ln -s /usr/local/bin/python3.6 /usr/local/bin/python3 50 | 51 | ./autogen.sh 52 | ./configure 53 | make 54 | 55 | # Install in base temp dir 56 | 57 | make DESTDIR=$TMPDIR install 58 | 59 | # Delete compilation work directory 60 | 61 | cd .. 62 | rm -r -f $WRKDIR 63 | 64 | # Adjust directory access rigths 65 | 66 | 67 | find $TMPDIR/ -type d | xargs chmod -v 755; 68 | 69 | # Strip executables 70 | 71 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 72 | 73 | ################################################### 74 | # Create base extension in temp dir # 75 | ################################################### 76 | 77 | cd $TMPDIR 78 | cd .. 79 | mksquashfs $TMPDIR $EXTNAM.tcz 80 | cd $TMPDIR 81 | find usr -not -type d > $EXTNAM.tcz.list 82 | mv ../$EXTNAM.tcz . 83 | 84 | # Create md5 file 85 | 86 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 87 | 88 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 89 | 90 | cd $INITIALDIR 91 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-RTIMULib/python-RTIMULib.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | SRCNAM=RTIMULib2.tar.gz 16 | WRKDIR=RTIMULib 17 | 18 | PYTHONVERSION=`cat /opt/python` 19 | PYTHON=python$PYTHONVERSION 20 | EXTNAM=$PYTHON-RTIMULib 21 | TMPDIR=/tmp/$EXTNAM 22 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 23 | 24 | ###################################################### 25 | # Prepare extension creation # 26 | ###################################################### 27 | 28 | INITIALDIR=$PWD 29 | 30 | # Remove dirs and files left from previous creation 31 | 32 | #rm -r -f $PYTDIR/$WRKDIR*.egg 33 | 34 | # Create temporary directory 35 | 36 | mkdir -p $TMPDIR/$PYTDIR 37 | 38 | ###################################################### 39 | # Compile extension # 40 | ###################################################### 41 | 42 | # Export variables needed for compilation 43 | 44 | export CFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 45 | export CXXFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 46 | 47 | # Unpack source in current directory 48 | 49 | tar -xf $SRCNAM 50 | mv RTIMULib2 RTIMULib 51 | 52 | # Configure it 53 | 54 | cd $WRKDIR/Linux/python 55 | 56 | # Build and Install 57 | 58 | $PYTHON setup.py bdist 59 | tar xvf dist/*tar.gz -C $TMPDIR 60 | 61 | # Delete compilation work directory 62 | 63 | cd ../../.. 64 | rm -r -f $WRKDIR 65 | 66 | # Adjust directory access rigths 67 | 68 | find $TMPDIR/ -type d | xargs chmod -v 755; 69 | 70 | ################################################### 71 | # Create base extension in temp dir # 72 | ################################################### 73 | 74 | cd $TMPDIR 75 | cd .. 76 | mksquashfs $TMPDIR $EXTNAM.tcz 77 | cd $TMPDIR 78 | find usr -not -type d > $EXTNAM.tcz.list 79 | mv ../$EXTNAM.tcz . 80 | 81 | # Create md5 file 82 | 83 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 84 | 85 | sudo cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 86 | 87 | # Cleanup temp directory 88 | 89 | rm -rf * 90 | 91 | cd $INITIALDIR 92 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-numpy/python-numpy.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | WRKDIR=numpy-1.18.1 16 | SRCNAM=$WRKDIR.tar.gz 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-numpy 19 | TMPDIR=/tmp/$PYTHON-numpy 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | wget -c https://github.com/numpy/numpy/releases/download/v1.18.1/numpy-1.18.1.tar.gz 23 | #wget -c https://github.com/numpy/numpy/releases/download/v1.12.0rc2/numpy-1.12.0rc2.tar.gz 24 | 25 | ###################################################### 26 | # Prepare extension creation # 27 | ###################################################### 28 | 29 | # Remove dirs and files left from previous creation 30 | 31 | rm -r -f $PYTDIR/$EXTNAM*.egg 32 | 33 | # Create temporary directory 34 | 35 | mkdir -p $TMPDIR/$PYTDIR 36 | 37 | ###################################################### 38 | # Compile extension # 39 | ###################################################### 40 | 41 | INITIALDIR=$PWD 42 | 43 | # Export variables needed for compilation 44 | 45 | export CFLAGS="-Os -pipe" 46 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 47 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 48 | 49 | # Unpack source in current directory 50 | 51 | tar -xf $SRCNAM 52 | 53 | # Configure it 54 | 55 | cd $WRKDIR 56 | 57 | # Install in place 58 | 59 | sudo $PYTHON setup.py install 60 | 61 | # Delete compilation work directory 62 | 63 | cd .. 64 | rm -rf $WRKDIR 65 | 66 | # Move files to tmp dir 67 | 68 | mkdir -p $TMPDIR/$PYTDIR 69 | cp -r $PYTDIR/numpy-*.egg $TMPDIR/$PYTDIR 70 | 71 | # Delete *.pyc files 72 | 73 | find $TMPDIR/ -name *.pyc | xargs rm -r 74 | 75 | # Adjust directory access rigths 76 | 77 | find $TMPDIR/ -type d | xargs chmod -v 755; 78 | 79 | # Strip executables 80 | 81 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 82 | 83 | ################################################### 84 | # Create base extension in temp dir # 85 | ################################################### 86 | 87 | cd $TMPDIR 88 | cd .. 89 | mksquashfs $TMPDIR $EXTNAM.tcz 90 | cd $TMPDIR 91 | find usr -not -type d > $EXTNAM.tcz.list 92 | mv ../$EXTNAM.tcz . 93 | 94 | # Create md5 file 95 | 96 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 97 | 98 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 99 | 100 | # Cleanup temp directory 101 | 102 | rm -rf * 103 | 104 | cd $INITIALDIR 105 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-pylirc/python-lirc.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | WRKDIR=python-lirc-1.2.3 16 | SRCNAM=$WRKDIR.tar.gz 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-pylirc 19 | TMPDIR=/tmp/$PYTHON-pylirc 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | #wget -c https://files.pythonhosted.org/packages/a9/e1/a19ed9cac5353ec07294be7b1aefc8f89985987b356e916e2c39b5b03d9a/pylirc2-0.1.tar.gz 23 | wget -c https://files.pythonhosted.org/packages/20/37/5614ed0459439a96430e1aac479b6608b51e69ca0bd7d91277517d5895e9/python-lirc-1.2.3.tar.gz 24 | 25 | 26 | ###################################################### 27 | # Prepare extension creation # 28 | ###################################################### 29 | 30 | # Remove dirs and files left from previous creation 31 | 32 | rm -r -f $PYTDIR/$EXTNAM*.egg 33 | 34 | # Create temporary directory 35 | 36 | mkdir -p $TMPDIR/$PYTDIR 37 | 38 | ###################################################### 39 | # Compile extension # 40 | ###################################################### 41 | 42 | INITIALDIR=$PWD 43 | 44 | # Export variables needed for compilation 45 | 46 | export CFLAGS="-Os -pipe" 47 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 48 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 49 | 50 | # Unpack source in current directory 51 | 52 | tar -xf $SRCNAM 53 | 54 | # Configure it 55 | 56 | cd $WRKDIR 57 | 58 | # Install in place 59 | 60 | sudo $PYTHON setup.py install 61 | 62 | # Delete compilation work directory 63 | 64 | cd .. 65 | rm -rf $WRKDIR 66 | 67 | # Move files to tmp dir 68 | 69 | mkdir -p $TMPDIR/$PYTDIR 70 | cp -rv $PYTDIR/pylirc* $TMPDIR/$PYTDIR 71 | 72 | # Delete *.pyc files 73 | 74 | find $TMPDIR/ -name *.pyc | xargs rm -r 75 | 76 | # Adjust directory access rigths 77 | 78 | find $TMPDIR/ -type d | xargs chmod -v 755; 79 | 80 | # Strip executables 81 | 82 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 83 | 84 | ################################################### 85 | # Create base extension in temp dir # 86 | ################################################### 87 | 88 | cd $TMPDIR 89 | cd .. 90 | mksquashfs $TMPDIR $EXTNAM.tcz 91 | cd $TMPDIR 92 | find usr -not -type d > $EXTNAM.tcz.list 93 | mv ../$EXTNAM.tcz . 94 | 95 | # Create md5 file 96 | 97 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 98 | 99 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 100 | 101 | # Cleanup temp directory 102 | 103 | rm -rf * 104 | 105 | cd $INITIALDIR 106 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-pyudev/python-pyudev.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | PYTHON=`cat /opt/python` 16 | 17 | SRCNAM=pyudev-git160618.tar.gz 18 | WRKDIR=pyudev 19 | EXTNAM=$PYTHON-pyudev 20 | TMPDIR=/tmp/$PYTHON-pyudev 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | # Remove dirs and files left from previous creation 28 | 29 | rm -r -f $PYTDIR/$EXTNAM*.egg 30 | 31 | # Create temporary directory 32 | 33 | mkdir -p $TMPDIR/$PYTDIR 34 | 35 | ###################################################### 36 | # Compile extension # 37 | ###################################################### 38 | 39 | INITIALDIR=$PWD 40 | 41 | # Export variables needed for compilation 42 | 43 | export CFLAGS="-Os -pipe" 44 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 45 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 46 | 47 | # Unpack source in current directory 48 | 49 | tar -xf $SRCNAM 50 | 51 | # Configure it 52 | 53 | cd $WRKDIR 54 | 55 | # Install in place 56 | 57 | sudo $PYTHON setup.py bdist 58 | tar xvf dist/*tar.gz -C $TMPDIR 59 | 60 | # Delete compilation work directory 61 | 62 | cd .. 63 | rm -r -f $WRKDIR 64 | 65 | # Adjust directory access rigths 66 | 67 | find $TMPDIR/ -type d | xargs chmod -v 755; 68 | 69 | ################################################### 70 | # Create base extension in temp dir # 71 | ################################################### 72 | 73 | cd $TMPDIR 74 | cd .. 75 | mksquashfs $TMPDIR $EXTNAM.tcz 76 | cd $TMPDIR 77 | find usr -not -type d > $EXTNAM.tcz.list 78 | mv ../$EXTNAM.tcz . 79 | 80 | # Create md5 file 81 | 82 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 83 | 84 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 85 | 86 | # Cleanup temp directory 87 | 88 | rm -rf * 89 | 90 | cd $INITIALDIR 91 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-scipy/python-scipy.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | SRCNAM=scipy-0.18.1.tar.gz 16 | WRKDIR=scipy-0.18.1 17 | PYTHONVERSION=`cat /opt/python` 18 | PYTHON="python"$PYTHONVERSION 19 | EXTNAM=$PYTHON-scipy 20 | TMPDIR=/tmp/$PYTHON-scipy 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | # Create temporary directory 28 | 29 | mkdir -p $TMPDIR/$PYTDIR 30 | 31 | ###################################################### 32 | # Compile extension # 33 | ###################################################### 34 | 35 | INITIALDIR=$PWD 36 | 37 | # Export variables needed for compilation 38 | 39 | export CFLAGS="-Os -pipe" 40 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 41 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 42 | 43 | if [ -e $PYTDIR/easy-install.pth ]; then 44 | echo 'please remove the file:' 45 | echo $PYTDIR/easy-install.pth 46 | fi 47 | 48 | # Unpack source in current directory 49 | 50 | tar -xf $SRCNAM 51 | 52 | # Configure it 53 | 54 | cd $WRKDIR 55 | 56 | # Install in place 57 | 58 | sudo $PYTHON setup.py install 59 | 60 | # Delete compilation work directory 61 | 62 | cd .. 63 | #rm -rf $WRKDIR 64 | 65 | # Move files to tmp dir 66 | 67 | mkdir -p $TMPDIR/$PYTDIR 68 | cp -r $PYTDIR/scipy* $TMPDIR/$PYTDIR 69 | cp $PYTDIR/easy-install.pth $TMPDIR/$PYTDIR/scipy.pth 70 | 71 | # Delete *.pyc files 72 | 73 | find $TMPDIR/ -name *.pyc | xargs rm -r 74 | 75 | # Adjust directory access rigths 76 | 77 | find $TMPDIR/ -type d | xargs chmod -v 755; 78 | 79 | # Strip executables 80 | 81 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 82 | 83 | ################################################### 84 | # Create base extension in temp dir # 85 | ################################################### 86 | 87 | cd $TMPDIR 88 | cd .. 89 | mksquashfs $TMPDIR $EXTNAM.tcz 90 | cd $TMPDIR 91 | find usr -not -type d > $EXTNAM.tcz.list 92 | mv ../$EXTNAM.tcz . 93 | 94 | # Create md5 file 95 | 96 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 97 | 98 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 99 | 100 | # Cleanup temp directory 101 | 102 | rm -rf * 103 | 104 | cd $INITIALDIR 105 | 106 | sudo cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 107 | 108 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-scipy/python-scipy2.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=scipy 15 | NAM=scipy 16 | 17 | PYTHONVERSION=`cat /opt/python` 18 | PYTHON="python"$PYTHONVERSION 19 | EXTNAM=$PYTHON-$NAM 20 | TMPDIR=/tmp/$PYTHON-$NAM 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | INITIALDIR=$PWD 28 | 29 | # Remove dirs and files left from previous creation 30 | 31 | #sudo pip3.6 uninstall Flask 32 | 33 | # Create temporary directory 34 | 35 | mkdir -p $TMPDIR$PYTDIR 36 | 37 | ###################################################### 38 | # Compile extension # 39 | ###################################################### 40 | 41 | # Install in place 42 | 43 | sudo pip3.6 install $PYNAM 44 | 45 | # Move files to tmp dir 46 | 47 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 48 | 49 | # Delete *.pyc files 50 | 51 | find $TMPDIR/ -name *.pyc | xargs rm -r 52 | 53 | # Adjust directory access rigths 54 | 55 | find $TMPDIR/ -type d | xargs chmod -v 755; 56 | 57 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 58 | 59 | 60 | ################################################### 61 | # Create base extension in temp dir # 62 | ################################################### 63 | 64 | cd $TMPDIR 65 | cd .. 66 | mksquashfs $TMPDIR $EXTNAM.tcz 67 | cd $TMPDIR 68 | find usr -not -type d > $EXTNAM.tcz.list 69 | mv -f ../$EXTNAM.tcz . 70 | 71 | # Create md5 file 72 | 73 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 74 | 75 | # copy extension files 76 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 77 | 78 | # Cleanup temp directory 79 | 80 | rm -rf * 81 | 82 | cd $INITIALDIR 83 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-serial.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=pyserial 15 | NAM=serial 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-spidev/python-spidev.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | PYTHON=`cat /opt/python` 16 | 17 | SRCNAM=spidev-3.4.tar.gz 18 | WRKDIR=spidev-3.4 19 | EXTNAM=$PYTHON-spidev 20 | TMPDIR=/tmp/$PYTHON-spidev 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | # Remove dirs and files left from previous creation 28 | 29 | rm -r -f $PYTDIR/$EXTNAM*.egg 30 | 31 | # Create temporary directory 32 | 33 | mkdir -p $TMPDIR/$PYTDIR 34 | 35 | ###################################################### 36 | # Compile extension # 37 | ###################################################### 38 | 39 | INITIALDIR=$PWD 40 | 41 | # Export variables needed for compilation 42 | 43 | export CFLAGS="-Os -pipe" 44 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 45 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 46 | 47 | # Unpack source in current directory 48 | 49 | tar -xf $SRCNAM 50 | 51 | # Configure it 52 | 53 | cd $WRKDIR 54 | 55 | # Install in place 56 | 57 | sudo $PYTHON setup.py bdist 58 | tar xvf dist/*tar.gz -C $TMPDIR 59 | 60 | # Delete compilation work directory 61 | 62 | cd .. 63 | rm -r -f $WRKDIR 64 | 65 | # Adjust directory access rigths 66 | 67 | find $TMPDIR/ -type d | xargs chmod -v 755; 68 | 69 | ################################################### 70 | # Create base extension in temp dir # 71 | ################################################### 72 | 73 | cd $TMPDIR 74 | cd .. 75 | mksquashfs $TMPDIR $EXTNAM.tcz 76 | cd $TMPDIR 77 | find usr -not -type d > $EXTNAM.tcz.list 78 | mv ../$EXTNAM.tcz . 79 | 80 | # Create md5 file 81 | 82 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 83 | 84 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 85 | 86 | # Cleanup temp directory 87 | 88 | rm -rf * 89 | 90 | cd $INITIALDIR 91 | -------------------------------------------------------------------------------- /pypilot_dependencies/python-ujson/python-ujson.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=ujson 15 | NAM=ujson-3.0.0 16 | ##NAM=ultrajson-d185144 17 | 18 | PYTHON=python`cat /opt/python` 19 | EXTNAM=$PYTHON-$PYNAM 20 | TMPDIR=/tmp/$PYTHON-$NAM 21 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 22 | 23 | ###################################################### 24 | # Prepare extension creation # 25 | ###################################################### 26 | 27 | INITIALDIR=$PWD 28 | 29 | # Remove dirs and files left from previous creation 30 | if [ -e $PYTDIR/easy-install.pth ]; then 31 | echo 'please remove the file:' 32 | echo $PYTDIR/easy-install.pth 33 | fi 34 | 35 | # Create temporary directory 36 | 37 | mkdir -p $TMPDIR$PYTDIR 38 | 39 | ###################################################### 40 | # Compile extension # 41 | ###################################################### 42 | 43 | # Install in place 44 | tar zxvf $NAM*tar.gz 45 | cd $NAM* 46 | 47 | sudo $PYTHON setup.py install 48 | 49 | # Move files to tmp dir 50 | 51 | mkdir -p $TMPDIR$PYTDIR 52 | cp -rf $PYTDIR/ujson*egg/ujson*so $TMPDIR$PYTDIR 53 | 54 | # Delete *.pyc files 55 | 56 | find $TMPDIR/ -name *.pyc | xargs rm -r 57 | 58 | # Adjust directory access rigths 59 | 60 | find $TMPDIR/ -type d | xargs chmod -v 755; 61 | 62 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 63 | 64 | 65 | ################################################### 66 | # Create base extension in temp dir # 67 | ################################################### 68 | 69 | cd $TMPDIR 70 | cd .. 71 | mksquashfs $TMPDIR $EXTNAM.tcz 72 | cd $TMPDIR 73 | find usr -not -type d > $EXTNAM.tcz.list 74 | mv -f ../$EXTNAM.tcz . 75 | 76 | # Create md5 file 77 | 78 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 79 | 80 | # copy extension files 81 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 82 | 83 | # Cleanup temp directory 84 | 85 | rm -rf * 86 | 87 | cd $INITIALDIR 88 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-certifi.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=certifi 15 | NAM=certifi 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-chardet.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=chardet 15 | NAM=chardet 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-idna.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=idna 15 | NAM=idna 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-ifaddr.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=ifaddr 15 | NAM=ifaddr 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-requests.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=requests 15 | NAM=requests 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-urllib3.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=urllib3 15 | NAM=urllib3 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-websocket.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=websocket-client 15 | NAM=websocket 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/signalk/python-zeroconf.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=zeroconf 15 | NAM=zeroconf 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/all: -------------------------------------------------------------------------------- 1 | for i in `cat * | grep ^NAM= | sed s,NAM=,,g`; do 2 | echo python-$i 3 | tce-load -i python-$i 4 | done 5 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-babel.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=Babel 15 | NAM=babel 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | #sudo pip3.6 install $PYNAM 43 | sudo pip3.6 install pytz*whl 44 | sudo pip3.6 install $PYNAM*whl 45 | sudo pip3.6 install Flask_$PYNAM*whl 46 | 47 | # Move files to tmp dir 48 | 49 | cp -rf $PYTDIR/pytz-*-info $PYTDIR/pytz $TMPDIR$PYTDIR 50 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $TMPDIR$PYTDIR 51 | cp -rf $PYTDIR/Flask_$PYNAM-*-info $PYTDIR/flask_$NAM $TMPDIR$PYTDIR 52 | 53 | # Delete *.pyc files 54 | 55 | find $TMPDIR/ -name *.pyc | xargs rm -r 56 | 57 | # Adjust directory access rigths 58 | 59 | find $TMPDIR/ -type d | xargs chmod -v 755; 60 | 61 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 62 | 63 | rm -r $TMPDIR/usr/local/lib/$PYTHON/site-packages/babel/locale-data 64 | 65 | # NOTE 66 | # I made all locale-data dat files empty 67 | # for i in *; do touch ../locale-data/$i; done 68 | 69 | 70 | ################################################### 71 | # Create base extension in temp dir # 72 | ################################################### 73 | 74 | cd $TMPDIR 75 | cd .. 76 | mksquashfs $TMPDIR $EXTNAM.tcz 77 | cd $TMPDIR 78 | find usr -not -type d > $EXTNAM.tcz.list 79 | mv -f ../$EXTNAM.tcz . 80 | 81 | # Create md5 file 82 | 83 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 84 | 85 | # copy extension files 86 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 87 | 88 | # Cleanup temp directory 89 | 90 | rm -rf * 91 | 92 | cd $INITIALDIR 93 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-bidict.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=bidict 15 | NAM=bidict 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | #sudo pip3.6 install $PYNAM 43 | sudo pip3.6 install bidict-0.21.2-py2.py3-none-any.whl 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-click.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=click 15 | NAM=click 16 | 17 | PYTHON=`cat /opt/$PYTHON` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.63.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-engineio.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=python_engineio 15 | NAM=engineio 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | #sudo pip3.6 install $PYNAM 43 | sudo pip3.6 install $PYNAM* 44 | 45 | # Move files to tmp dir 46 | 47 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 48 | 49 | # Delete *.pyc files 50 | 51 | find $TMPDIR/ -name *.pyc | xargs rm -r 52 | 53 | # Adjust directory access rigths 54 | 55 | find $TMPDIR/ -type d | xargs chmod -v 755; 56 | 57 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 58 | 59 | 60 | ################################################### 61 | # Create base extension in temp dir # 62 | ################################################### 63 | 64 | cd $TMPDIR 65 | cd .. 66 | mksquashfs $TMPDIR $EXTNAM.tcz 67 | cd $TMPDIR 68 | find usr -not -type d > $EXTNAM.tcz.list 69 | mv -f ../$EXTNAM.tcz . 70 | 71 | # Create md5 file 72 | 73 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 74 | 75 | # copy extension files 76 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 77 | 78 | # Cleanup temp directory 79 | 80 | rm -rf * 81 | 82 | cd $INITIALDIR 83 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-flask.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=Flask 15 | NAM=flask 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-flask_socketio.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=Flask_SocketIO 15 | NAM=flask_socketio 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | #sudo pip3.6 install $PYNAM 43 | sudo pip3.6 install $PYNAM*whl 44 | 45 | # Move files to tmp dir 46 | 47 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 48 | 49 | # Delete *.pyc files 50 | 51 | find $TMPDIR/ -name *.pyc | xargs rm -r 52 | 53 | # Adjust directory access rigths 54 | 55 | find $TMPDIR/ -type d | xargs chmod -v 755; 56 | 57 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 58 | 59 | 60 | ################################################### 61 | # Create base extension in temp dir # 62 | ################################################### 63 | 64 | cd $TMPDIR 65 | cd .. 66 | mksquashfs $TMPDIR $EXTNAM.tcz 67 | cd $TMPDIR 68 | find usr -not -type d > $EXTNAM.tcz.list 69 | mv -f ../$EXTNAM.tcz . 70 | 71 | # Create md5 file 72 | 73 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 74 | 75 | # copy extension files 76 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 77 | 78 | # Cleanup temp directory 79 | 80 | rm -rf * 81 | 82 | cd $INITIALDIR 83 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-gevent.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=gevent 15 | NAM=gevent 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-gevent_websocket.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=gevent_websocket 15 | NAM=geventwebsocket 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*so $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-greenlet.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=greenlet 15 | NAM=greenlet 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*so $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-itsdangerous.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=itsdangerous 15 | NAM=itsdangerous 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-jinja2.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=Jinja2 15 | NAM=jinja2 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-markupsafe.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=MarkupSafe 15 | NAM=markupsafe 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-six.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=six 15 | NAM=six 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-socketio.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=socketio 15 | NAM=socketio 16 | 17 | PYTHON=python`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | #sudo pip3.6 install $PYNAM 43 | sudo pip3.6 install python_socketio-5.3.0-py2.py3-none-any.whl 44 | 45 | # Move files to tmp dir 46 | 47 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 48 | 49 | # Delete *.pyc files 50 | 51 | find $TMPDIR/ -name *.pyc | xargs rm -r 52 | 53 | # Adjust directory access rigths 54 | 55 | find $TMPDIR/ -type d | xargs chmod -v 755; 56 | 57 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 58 | 59 | 60 | ################################################### 61 | # Create base extension in temp dir # 62 | ################################################### 63 | 64 | cd $TMPDIR 65 | cd .. 66 | mksquashfs $TMPDIR $EXTNAM.tcz 67 | cd $TMPDIR 68 | find usr -not -type d > $EXTNAM.tcz.list 69 | mv -f ../$EXTNAM.tcz . 70 | 71 | # Create md5 file 72 | 73 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 74 | 75 | # copy extension files 76 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 77 | 78 | # Cleanup temp directory 79 | 80 | rm -rf * 81 | 82 | cd $INITIALDIR 83 | -------------------------------------------------------------------------------- /pypilot_dependencies/web/python-werkzeug.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | ###################################################### 9 | 10 | ###################################################### 11 | # Configure extension creation parameters # 12 | ###################################################### 13 | 14 | PYNAM=Werkzeug 15 | NAM=werkzeug 16 | 17 | PYTHON=`cat /opt/python` 18 | EXTNAM=$PYTHON-$NAM 19 | TMPDIR=/tmp/$PYTHON-$NAM 20 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 21 | 22 | ###################################################### 23 | # Prepare extension creation # 24 | ###################################################### 25 | 26 | INITIALDIR=$PWD 27 | 28 | # Remove dirs and files left from previous creation 29 | 30 | #sudo pip3.6 uninstall Flask 31 | 32 | # Create temporary directory 33 | 34 | mkdir -p $TMPDIR$PYTDIR 35 | 36 | ###################################################### 37 | # Compile extension # 38 | ###################################################### 39 | 40 | # Install in place 41 | 42 | sudo pip3.6 install $PYNAM 43 | 44 | # Move files to tmp dir 45 | 46 | cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR 47 | 48 | # Delete *.pyc files 49 | 50 | find $TMPDIR/ -name *.pyc | xargs rm -r 51 | 52 | # Adjust directory access rigths 53 | 54 | find $TMPDIR/ -type d | xargs chmod -v 755; 55 | 56 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 57 | 58 | 59 | ################################################### 60 | # Create base extension in temp dir # 61 | ################################################### 62 | 63 | cd $TMPDIR 64 | cd .. 65 | mksquashfs $TMPDIR $EXTNAM.tcz 66 | cd $TMPDIR 67 | find usr -not -type d > $EXTNAM.tcz.list 68 | mv -f ../$EXTNAM.tcz . 69 | 70 | # Create md5 file 71 | 72 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 73 | 74 | # copy extension files 75 | cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 76 | 77 | # Cleanup temp directory 78 | 79 | rm -rf * 80 | 81 | cd $INITIALDIR 82 | -------------------------------------------------------------------------------- /runit/runit.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Configure extension creation parameters # 11 | ###################################################### 12 | 13 | SRCNAM=runit-2.1.2.tar.gz 14 | WRKDIR=admin 15 | EXTNAM=runit 16 | TMPDIR=/tmp/runit 17 | 18 | DESTDIR=$TMPDIR/usr/local/bin 19 | 20 | ###################################################### 21 | # Prepare extension creation # 22 | ###################################################### 23 | 24 | INITIALDIR=$PWD 25 | 26 | # Remove dirs and files left from previous creation 27 | 28 | rm -rf $WRKDIR 29 | rm -rf $TMPDIR 30 | 31 | # Create temporary directory 32 | 33 | mkdir -p $DESTDIR 34 | 35 | ###################################################### 36 | # Compile extension # 37 | ###################################################### 38 | 39 | # Export variables needed for compilation 40 | 41 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 42 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 43 | #export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 44 | 45 | # Unpack source in current directory 46 | 47 | tar -xf $SRCNAM 48 | 49 | # Configure it 50 | 51 | cd $WRKDIR/runit-2.1.2/src 52 | 53 | # Compile 54 | 55 | make 56 | 57 | cp -v sv runsvdir runsv svlogd chpst $DESTDIR 58 | cd ../../.. 59 | 60 | rm -r -f $WRKDIR 61 | 62 | # Adjust directory access rigths 63 | 64 | find $TMPDIR/ -type d | xargs chmod -v 755; 65 | 66 | # Strip executables 67 | 68 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 69 | 70 | ################################################### 71 | # Create base extension in temp dir # 72 | ################################################### 73 | 74 | cd $TMPDIR 75 | cd .. 76 | mksquashfs $TMPDIR $EXTNAM.tcz 77 | cd $TMPDIR 78 | find usr -not -type d > $EXTNAM.tcz.list 79 | mv ../$EXTNAM.tcz . 80 | 81 | # Create md5 file 82 | 83 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 84 | 85 | 86 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 87 | 88 | # Cleanup temp directory 89 | 90 | rm -rf * 91 | 92 | cd $INITIALDIR 93 | -------------------------------------------------------------------------------- /scons/scons.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script for RPI # 5 | # # 6 | # See .info for details # 7 | # # 8 | # February 13, 2013 # 9 | ###################################################### 10 | 11 | ###################################################### 12 | # Configure extension creation parameters # 13 | ###################################################### 14 | 15 | PYTHON=`cat /opt/python` 16 | 17 | 18 | WRKDIR=scons-3.1.2 19 | SRCNAM=$WRKDIR.tar.gz 20 | EXTNAM=scons 21 | TMPDIR=/tmp/$PYTHON-$EXTNAM 22 | PYTDIR=/usr/local/lib/$PYTHON/site-packages 23 | 24 | wget -c http://prdownloads.sourceforge.net/scons/$SRCNAM 25 | 26 | ###################################################### 27 | # Prepare extension creation # 28 | ###################################################### 29 | 30 | # Remove dirs and files left from previous creation 31 | 32 | rm -r -f $PYTDIR/$EXTNAM*.egg 33 | 34 | # Create temporary directory 35 | 36 | mkdir -p $TMPDIR/$PYTDIR 37 | 38 | ###################################################### 39 | # Compile extension # 40 | ###################################################### 41 | 42 | INITIALDIR=$PWD 43 | 44 | # Export variables needed for compilation 45 | 46 | export CFLAGS="-Os -pipe" 47 | export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" 48 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig 49 | 50 | # Unpack source in current directory 51 | 52 | tar xf $SRCNAM 53 | 54 | # Configure it 55 | 56 | cd $WRKDIR 57 | 58 | # Install in place 59 | 60 | sudo $PYTHON setup.py install 61 | 62 | # Delete compilation work directory 63 | 64 | cd .. 65 | sudo rm -rf $WRKDIR 66 | 67 | # Move files to tmp dir 68 | 69 | mkdir -p $TMPDIR/$PYTDIR 70 | cp -rv $PYTDIR/RPi* $TMPDIR/$PYTDIR 71 | 72 | # Delete *.pyc files 73 | 74 | find $TMPDIR/ -name *.pyc | xargs rm -r 75 | 76 | # Adjust directory access rigths 77 | 78 | find $TMPDIR/ -type d | xargs chmod -v 755; 79 | 80 | # Strip executables 81 | 82 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 83 | 84 | ################################################### 85 | # Create base extension in temp dir # 86 | ################################################### 87 | 88 | cd $TMPDIR 89 | cd .. 90 | mksquashfs $TMPDIR $EXTNAM.tcz 91 | cd $TMPDIR 92 | find usr -not -type d > $EXTNAM.tcz.list 93 | mv ../$EXTNAM.tcz . 94 | 95 | # Create md5 file 96 | 97 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 98 | 99 | cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 100 | 101 | # Cleanup temp directory 102 | 103 | rm -rf * 104 | 105 | cd $INITIALDIR 106 | -------------------------------------------------------------------------------- /serialposix.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # backend for serial IO for POSIX compatible systems, like Linux, OSX 4 | # 5 | # This file is part of pySerial. https://github.com/pyserial/pyserial 6 | # (C) 2001-2016 Chris Liechti 7 | # 8 | # SPDX-License-Identifier: BSD-3-Clause 9 | # 10 | # parts based on code from Grant B. Edwards : 11 | # ftp://ftp.visi.com/users/grante/python/PosixSerial.py 12 | # 13 | # references: http://www.easysw.com/~mike/serial/serial.html 14 | 15 | # Collection of port names (was previously used by number_to_device which was 16 | # removed. 17 | # - Linux /dev/ttyS%d (confirmed) 18 | # - cygwin/win32 /dev/com%d (confirmed) 19 | # - openbsd (OpenBSD) /dev/cua%02d 20 | # - bsd*, freebsd* /dev/cuad%d 21 | # - darwin (OS X) /dev/cuad%d 22 | # - netbsd /dev/dty%02d (NetBSD 1.6 testing by Erk) 23 | # - irix (IRIX) /dev/ttyf%d (partially tested) names depending on flow control 24 | # - hp (HP-UX) /dev/tty%dp0 (not tested) 25 | # - sunos (Solaris/SunOS) /dev/tty%c (letters, 'a'..'z') (confirmed) 26 | # - aix (AIX) /dev/tty%d 27 | 28 | 29 | # pylint: disable=abstract-method 30 | import errno 31 | import fcntl 32 | import os 33 | import select 34 | import struct 35 | import sys 36 | import termios 37 | 38 | import serial 39 | from serial.serialutil import SerialBase, SerialException, to_bytes, \ 40 | portNotOpenError, writeTimeoutError, Timeout 41 | 42 | 43 | class PlatformSpecificBase(object): 44 | BAUDRATE_CONSTANTS = {} 45 | 46 | def _set_special_baudrate(self, baudrate): 47 | raise NotImplementedError('non-standard baudrates are not supported on this platform') 48 | 49 | def _set_rs485_mode(self, rs485_settings): 50 | raise NotImplementedError('RS485 not supported on this platform') 51 | 52 | 53 | # some systems support an extra flag to enable the two in POSIX unsupported 54 | # paritiy settings for MARK and SPACE 55 | CMSPAR = 0 # default, for unsupported platforms, override below 56 | 57 | # try to detect the OS so that a device can be selected... 58 | # this code block should supply a device() and set_special_baudrate() function 59 | # for the platform 60 | plat = sys.platform.lower() 61 | 62 | if plat[:5] == 'linux': # Linux (confirmed) # noqa 63 | import array 64 | 65 | # extra termios flags 66 | CMSPAR = 0o10000000000 # Use "stick" (mark/space) parity 67 | 68 | # baudrate ioctls 69 | TCGETS2 = 0x802C542A 70 | TCSETS2 = 0x402C542B 71 | BOTHER = 0o010000 72 | 73 | # RS485 ioctls 74 | TIOCGRS485 = 0x542E 75 | TIOCSRS485 = 0x542F 76 | SER_RS485_ENABLED = 0b00000001 77 | SER_RS485_RTS_ON_SEND = 0b00000010 78 | SER_RS485_RTS_AFTER_SEND = 0b00000100 79 | SER_RS485_RX_DURING_TX = 0b00010000 80 | 81 | class PlatformSpecific(PlatformSpecificBase): 82 | BAUDRATE_CONSTANTS = { 83 | 0: 0o000000, # hang up 84 | 50: 0o000001, 85 | 75: 0o000002, 86 | 110: 0o000003, 87 | 134: 0o000004, 88 | 150: 0o000005, 89 | 200: 0o000006, 90 | 300: 0o000007, 91 | 600: 0o000010, 92 | 1200: 0o000011, 93 | 1800: 0o000012, 94 | 2400: 0o000013, 95 | 4800: 0o000014, 96 | 9600: 0o000015, 97 | 19200: 0o000016, 98 | 38400: 0o000017, 99 | 57600: 0o010001, 100 | 115200: 0o010002, 101 | 230400: 0o010003, 102 | 460800: 0o010004, 103 | 500000: 0o010005, 104 | 576000: 0o010006, 105 | 921600: 0o010007, 106 | 1000000: 0o010010, 107 | 1152000: 0o010011, 108 | 1500000: 0o010012, 109 | 2000000: 0o010013, 110 | 2500000: 0o010014, 111 | 3000000: 0o010015, 112 | 3500000: 0o010016, 113 | 4000000: 0o010017 114 | } 115 | 116 | def _set_special_baudrate(self, baudrate): 117 | # right size is 44 on x86_64, allow for some growth 118 | buf = array.array('i', [0] * 64) 119 | try: 120 | # get serial_struct 121 | fcntl.ioctl(self.fd, TCGETS2, buf) 122 | # set custom speed 123 | buf[2] &= ~termios.CBAUD 124 | buf[2] |= BOTHER 125 | buf[9] = buf[10] = baudrate 126 | 127 | # set serial_struct 128 | fcntl.ioctl(self.fd, TCSETS2, buf) 129 | except IOError as e: 130 | raise ValueError('Failed to set custom baud rate ({}): {}'.format(baudrate, e)) 131 | 132 | def _set_rs485_mode(self, rs485_settings): 133 | buf = array.array('i', [0] * 8) # flags, delaytx, delayrx, padding 134 | try: 135 | fcntl.ioctl(self.fd, TIOCGRS485, buf) 136 | buf[0] |= SER_RS485_ENABLED 137 | if rs485_settings is not None: 138 | if rs485_settings.loopback: 139 | buf[0] |= SER_RS485_RX_DURING_TX 140 | else: 141 | buf[0] &= ~SER_RS485_RX_DURING_TX 142 | if rs485_settings.rts_level_for_tx: 143 | buf[0] |= SER_RS485_RTS_ON_SEND 144 | else: 145 | buf[0] &= ~SER_RS485_RTS_ON_SEND 146 | if rs485_settings.rts_level_for_rx: 147 | buf[0] |= SER_RS485_RTS_AFTER_SEND 148 | else: 149 | buf[0] &= ~SER_RS485_RTS_AFTER_SEND 150 | if rs485_settings.delay_before_tx is not None: 151 | buf[1] = int(rs485_settings.delay_before_tx * 1000) 152 | if rs485_settings.delay_before_rx is not None: 153 | buf[2] = int(rs485_settings.delay_before_rx * 1000) 154 | else: 155 | buf[0] = 0 # clear SER_RS485_ENABLED 156 | fcntl.ioctl(self.fd, TIOCSRS485, buf) 157 | except IOError as e: 158 | raise ValueError('Failed to set RS485 mode: {}'.format(e)) 159 | 160 | 161 | elif plat == 'cygwin': # cygwin/win32 (confirmed) 162 | 163 | class PlatformSpecific(PlatformSpecificBase): 164 | BAUDRATE_CONSTANTS = { 165 | 128000: 0x01003, 166 | 256000: 0x01005, 167 | 500000: 0x01007, 168 | 576000: 0x01008, 169 | 921600: 0x01009, 170 | 1000000: 0x0100a, 171 | 1152000: 0x0100b, 172 | 1500000: 0x0100c, 173 | 2000000: 0x0100d, 174 | 2500000: 0x0100e, 175 | 3000000: 0x0100f 176 | } 177 | 178 | 179 | elif plat[:6] == 'darwin': # OS X 180 | import array 181 | IOSSIOSPEED = 0x80045402 # _IOW('T', 2, speed_t) 182 | 183 | class PlatformSpecific(PlatformSpecificBase): 184 | osx_version = os.uname()[2].split('.') 185 | # Tiger or above can support arbitrary serial speeds 186 | if int(osx_version[0]) >= 8: 187 | def _set_special_baudrate(self, baudrate): 188 | # use IOKit-specific call to set up high speeds 189 | buf = array.array('i', [baudrate]) 190 | fcntl.ioctl(self.fd, IOSSIOSPEED, buf, 1) 191 | 192 | elif plat[:3] == 'bsd' or \ 193 | plat[:7] == 'freebsd' or \ 194 | plat[:6] == 'netbsd' or \ 195 | plat[:7] == 'openbsd': 196 | 197 | class ReturnBaudrate(object): 198 | def __getitem__(self, key): 199 | return key 200 | 201 | class PlatformSpecific(PlatformSpecificBase): 202 | # Only tested on FreeBSD: 203 | # The baud rate may be passed in as 204 | # a literal value. 205 | BAUDRATE_CONSTANTS = ReturnBaudrate() 206 | 207 | else: 208 | class PlatformSpecific(PlatformSpecificBase): 209 | pass 210 | 211 | 212 | # load some constants for later use. 213 | # try to use values from termios, use defaults from linux otherwise 214 | TIOCMGET = getattr(termios, 'TIOCMGET', 0x5415) 215 | TIOCMBIS = getattr(termios, 'TIOCMBIS', 0x5416) 216 | TIOCMBIC = getattr(termios, 'TIOCMBIC', 0x5417) 217 | TIOCMSET = getattr(termios, 'TIOCMSET', 0x5418) 218 | 219 | # TIOCM_LE = getattr(termios, 'TIOCM_LE', 0x001) 220 | TIOCM_DTR = getattr(termios, 'TIOCM_DTR', 0x002) 221 | TIOCM_RTS = getattr(termios, 'TIOCM_RTS', 0x004) 222 | # TIOCM_ST = getattr(termios, 'TIOCM_ST', 0x008) 223 | # TIOCM_SR = getattr(termios, 'TIOCM_SR', 0x010) 224 | 225 | TIOCM_CTS = getattr(termios, 'TIOCM_CTS', 0x020) 226 | TIOCM_CAR = getattr(termios, 'TIOCM_CAR', 0x040) 227 | TIOCM_RNG = getattr(termios, 'TIOCM_RNG', 0x080) 228 | TIOCM_DSR = getattr(termios, 'TIOCM_DSR', 0x100) 229 | TIOCM_CD = getattr(termios, 'TIOCM_CD', TIOCM_CAR) 230 | TIOCM_RI = getattr(termios, 'TIOCM_RI', TIOCM_RNG) 231 | # TIOCM_OUT1 = getattr(termios, 'TIOCM_OUT1', 0x2000) 232 | # TIOCM_OUT2 = getattr(termios, 'TIOCM_OUT2', 0x4000) 233 | if hasattr(termios, 'TIOCINQ'): 234 | TIOCINQ = termios.TIOCINQ 235 | else: 236 | TIOCINQ = getattr(termios, 'FIONREAD', 0x541B) 237 | TIOCOUTQ = getattr(termios, 'TIOCOUTQ', 0x5411) 238 | 239 | TIOCM_zero_str = struct.pack('I', 0) 240 | TIOCM_RTS_str = struct.pack('I', TIOCM_RTS) 241 | TIOCM_DTR_str = struct.pack('I', TIOCM_DTR) 242 | 243 | TIOCSBRK = getattr(termios, 'TIOCSBRK', 0x5427) 244 | TIOCCBRK = getattr(termios, 'TIOCCBRK', 0x5428) 245 | 246 | 247 | class Serial(SerialBase, PlatformSpecific): 248 | """\ 249 | Serial port class POSIX implementation. Serial port configuration is 250 | done with termios and fcntl. Runs on Linux and many other Un*x like 251 | systems. 252 | """ 253 | 254 | def open(self): 255 | """\ 256 | Open port with current settings. This may throw a SerialException 257 | if the port cannot be opened.""" 258 | if self._port is None: 259 | raise SerialException("Port must be configured before it can be used.") 260 | if self.is_open: 261 | raise SerialException("Port is already open.") 262 | self.fd = None 263 | # open 264 | try: 265 | self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) 266 | except OSError as msg: 267 | self.fd = None 268 | raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) 269 | #~ fcntl.fcntl(self.fd, fcntl.F_SETFL, 0) # set blocking 270 | 271 | try: 272 | self._reconfigure_port(force_update=True) 273 | except: 274 | try: 275 | os.close(self.fd) 276 | except: 277 | # ignore any exception when closing the port 278 | # also to keep original exception that happened when setting up 279 | pass 280 | self.fd = None 281 | raise 282 | else: 283 | self.is_open = True 284 | try: 285 | if not self._dsrdtr: 286 | self._update_dtr_state() 287 | if not self._rtscts: 288 | self._update_rts_state() 289 | except IOError as e: 290 | if e.errno in (errno.EINVAL, errno.ENOTTY, errno.EIO): 291 | # ignore Invalid argument and Inappropriate ioctl 292 | pass 293 | else: 294 | raise 295 | self.reset_input_buffer() 296 | self.pipe_abort_read_r, self.pipe_abort_read_w = os.pipe() 297 | self.pipe_abort_write_r, self.pipe_abort_write_w = os.pipe() 298 | fcntl.fcntl(self.pipe_abort_read_r, fcntl.F_SETFL, os.O_NONBLOCK) 299 | fcntl.fcntl(self.pipe_abort_write_r, fcntl.F_SETFL, os.O_NONBLOCK) 300 | 301 | def _reconfigure_port(self, force_update=False): 302 | """Set communication parameters on opened port.""" 303 | if self.fd is None: 304 | raise SerialException("Can only operate on a valid file descriptor") 305 | 306 | # if exclusive lock is requested, create it before we modify anything else 307 | if self._exclusive is not None: 308 | if self._exclusive: 309 | try: 310 | fcntl.flock(self.fd, fcntl.LOCK_EX | fcntl.LOCK_NB) 311 | except IOError as msg: 312 | raise SerialException(msg.errno, "Could not exclusively lock port {}: {}".format(self._port, msg)) 313 | else: 314 | fcntl.flock(self.fd, fcntl.LOCK_UN) 315 | 316 | custom_baud = None 317 | 318 | vmin = vtime = 0 # timeout is done via select 319 | if self._inter_byte_timeout is not None: 320 | vmin = 1 321 | vtime = int(self._inter_byte_timeout * 10) 322 | try: 323 | orig_attr = termios.tcgetattr(self.fd) 324 | iflag, oflag, cflag, lflag, ispeed, ospeed, cc = orig_attr 325 | except termios.error as msg: # if a port is nonexistent but has a /dev file, it'll fail here 326 | raise SerialException("Could not configure port: {}".format(msg)) 327 | # set up raw mode / no echo / binary 328 | cflag |= (termios.CLOCAL | termios.CREAD) 329 | lflag &= ~(termios.ICANON | termios.ECHO | termios.ECHOE | 330 | termios.ECHOK | termios.ECHONL | 331 | termios.ISIG | termios.IEXTEN) # |termios.ECHOPRT 332 | for flag in ('ECHOCTL', 'ECHOKE'): # netbsd workaround for Erk 333 | if hasattr(termios, flag): 334 | lflag &= ~getattr(termios, flag) 335 | 336 | oflag &= ~(termios.OPOST | termios.ONLCR | termios.OCRNL) 337 | iflag &= ~(termios.INLCR | termios.IGNCR | termios.ICRNL | termios.IGNBRK) 338 | if hasattr(termios, 'IUCLC'): 339 | iflag &= ~termios.IUCLC 340 | if hasattr(termios, 'PARMRK'): 341 | iflag &= ~termios.PARMRK 342 | 343 | # setup baud rate 344 | try: 345 | ispeed = ospeed = getattr(termios, 'B{}'.format(self._baudrate)) 346 | except AttributeError: 347 | try: 348 | ispeed = ospeed = self.BAUDRATE_CONSTANTS[self._baudrate] 349 | except KeyError: 350 | #~ raise ValueError('Invalid baud rate: %r' % self._baudrate) 351 | # may need custom baud rate, it isn't in our list. 352 | ispeed = ospeed = getattr(termios, 'B38400') 353 | try: 354 | custom_baud = int(self._baudrate) # store for later 355 | except ValueError: 356 | raise ValueError('Invalid baud rate: {!r}'.format(self._baudrate)) 357 | else: 358 | if custom_baud < 0: 359 | raise ValueError('Invalid baud rate: {!r}'.format(self._baudrate)) 360 | 361 | # setup char len 362 | cflag &= ~termios.CSIZE 363 | if self._bytesize == 8: 364 | cflag |= termios.CS8 365 | elif self._bytesize == 7: 366 | cflag |= termios.CS7 367 | elif self._bytesize == 6: 368 | cflag |= termios.CS6 369 | elif self._bytesize == 5: 370 | cflag |= termios.CS5 371 | else: 372 | raise ValueError('Invalid char len: {!r}'.format(self._bytesize)) 373 | # setup stop bits 374 | if self._stopbits == serial.STOPBITS_ONE: 375 | cflag &= ~(termios.CSTOPB) 376 | elif self._stopbits == serial.STOPBITS_ONE_POINT_FIVE: 377 | cflag |= (termios.CSTOPB) # XXX same as TWO.. there is no POSIX support for 1.5 378 | elif self._stopbits == serial.STOPBITS_TWO: 379 | cflag |= (termios.CSTOPB) 380 | else: 381 | raise ValueError('Invalid stop bit specification: {!r}'.format(self._stopbits)) 382 | # setup parity 383 | iflag &= ~(termios.INPCK | termios.ISTRIP) 384 | if self._parity == serial.PARITY_NONE: 385 | cflag &= ~(termios.PARENB | termios.PARODD | CMSPAR) 386 | elif self._parity == serial.PARITY_EVEN: 387 | cflag &= ~(termios.PARODD | CMSPAR) 388 | cflag |= (termios.PARENB) 389 | elif self._parity == serial.PARITY_ODD: 390 | cflag &= ~CMSPAR 391 | cflag |= (termios.PARENB | termios.PARODD) 392 | elif self._parity == serial.PARITY_MARK and CMSPAR: 393 | cflag |= (termios.PARENB | CMSPAR | termios.PARODD) 394 | elif self._parity == serial.PARITY_SPACE and CMSPAR: 395 | cflag |= (termios.PARENB | CMSPAR) 396 | cflag &= ~(termios.PARODD) 397 | else: 398 | raise ValueError('Invalid parity: {!r}'.format(self._parity)) 399 | # setup flow control 400 | # xonxoff 401 | if hasattr(termios, 'IXANY'): 402 | if self._xonxoff: 403 | iflag |= (termios.IXON | termios.IXOFF) # |termios.IXANY) 404 | else: 405 | iflag &= ~(termios.IXON | termios.IXOFF | termios.IXANY) 406 | else: 407 | if self._xonxoff: 408 | iflag |= (termios.IXON | termios.IXOFF) 409 | else: 410 | iflag &= ~(termios.IXON | termios.IXOFF) 411 | # rtscts 412 | if hasattr(termios, 'CRTSCTS'): 413 | if self._rtscts: 414 | cflag |= (termios.CRTSCTS) 415 | else: 416 | cflag &= ~(termios.CRTSCTS) 417 | elif hasattr(termios, 'CNEW_RTSCTS'): # try it with alternate constant name 418 | if self._rtscts: 419 | cflag |= (termios.CNEW_RTSCTS) 420 | else: 421 | cflag &= ~(termios.CNEW_RTSCTS) 422 | # XXX should there be a warning if setting up rtscts (and xonxoff etc) fails?? 423 | 424 | # buffer 425 | # vmin "minimal number of characters to be read. 0 for non blocking" 426 | if vmin < 0 or vmin > 255: 427 | raise ValueError('Invalid vmin: {!r}'.format(vmin)) 428 | cc[termios.VMIN] = vmin 429 | # vtime 430 | if vtime < 0 or vtime > 255: 431 | raise ValueError('Invalid vtime: {!r}'.format(vtime)) 432 | cc[termios.VTIME] = vtime 433 | # activate settings 434 | if force_update or [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] != orig_attr: 435 | termios.tcsetattr( 436 | self.fd, 437 | termios.TCSANOW, 438 | [iflag, oflag, cflag, lflag, ispeed, ospeed, cc]) 439 | 440 | # apply custom baud rate, if any 441 | if custom_baud is not None: 442 | self._set_special_baudrate(custom_baud) 443 | 444 | if self._rs485_mode is not None: 445 | self._set_rs485_mode(self._rs485_mode) 446 | 447 | def close(self): 448 | """Close port""" 449 | if self.is_open: 450 | if self.fd is not None: 451 | os.close(self.fd) 452 | self.fd = None 453 | os.close(self.pipe_abort_read_w) 454 | os.close(self.pipe_abort_read_r) 455 | os.close(self.pipe_abort_write_w) 456 | os.close(self.pipe_abort_write_r) 457 | self.pipe_abort_read_r, self.pipe_abort_read_w = None, None 458 | self.pipe_abort_write_r, self.pipe_abort_write_w = None, None 459 | self.is_open = False 460 | 461 | # - - - - - - - - - - - - - - - - - - - - - - - - 462 | 463 | @property 464 | def in_waiting(self): 465 | """Return the number of bytes currently in the input buffer.""" 466 | #~ s = fcntl.ioctl(self.fd, termios.FIONREAD, TIOCM_zero_str) 467 | s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str) 468 | return struct.unpack('I', s)[0] 469 | 470 | # select based implementation, proved to work on many systems 471 | def read(self, size=1): 472 | """\ 473 | Read size bytes from the serial port. If a timeout is set it may 474 | return less characters as requested. With no timeout it will block 475 | until the requested number of bytes is read. 476 | """ 477 | if not self.is_open: 478 | raise portNotOpenError 479 | read = bytearray() 480 | timeout = Timeout(self._timeout) 481 | while len(read) < size: 482 | try: 483 | ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left()) 484 | if self.pipe_abort_read_r in ready: 485 | os.read(self.pipe_abort_read_r, 1000) 486 | break 487 | # If select was used with a timeout, and the timeout occurs, it 488 | # returns with empty lists -> thus abort read operation. 489 | # For timeout == 0 (non-blocking operation) also abort when 490 | # there is nothing to read. 491 | if not ready: 492 | break # timeout 493 | buf = os.read(self.fd, size - len(read)) 494 | # read should always return some data as select reported it was 495 | # ready to read when we get to this point. 496 | if not buf: 497 | # Disconnected devices, at least on Linux, show the 498 | # behavior that they are always ready to read immediately 499 | # but reading returns nothing. 500 | raise SerialException( 501 | 'device reports readiness to read but returned no data ' 502 | '(device disconnected or multiple access on port?)') 503 | read.extend(buf) 504 | except OSError as e: 505 | # this is for Python 3.x where select.error is a subclass of 506 | # OSError ignore BlockingIOErrors and EINTR. other errors are shown 507 | # https://www.python.org/dev/peps/pep-0475. 508 | if e.errno not in (errno.EAGAIN, errno.EALREADY, errno.EWOULDBLOCK, errno.EINPROGRESS, errno.EINTR): 509 | raise SerialException('read failed: {}'.format(e)) 510 | except select.error as e: 511 | # this is for Python 2.x 512 | # ignore BlockingIOErrors and EINTR. all errors are shown 513 | # see also http://www.python.org/dev/peps/pep-3151/#select 514 | if e[0] not in (errno.EAGAIN, errno.EALREADY, errno.EWOULDBLOCK, errno.EINPROGRESS, errno.EINTR): 515 | raise SerialException('read failed: {}'.format(e)) 516 | if timeout.expired(): 517 | break 518 | return bytes(read) 519 | 520 | def cancel_read(self): 521 | if self.is_open: 522 | os.write(self.pipe_abort_read_w, b"x") 523 | 524 | def cancel_write(self): 525 | if self.is_open: 526 | os.write(self.pipe_abort_write_w, b"x") 527 | 528 | def write(self, data): 529 | """Output the given byte string over the serial port.""" 530 | if not self.is_open: 531 | raise portNotOpenError 532 | d = to_bytes(data) 533 | tx_len = length = len(d) 534 | timeout = Timeout(self._write_timeout) 535 | while tx_len > 0: 536 | try: 537 | n = os.write(self.fd, d) 538 | if timeout.is_non_blocking: 539 | # Zero timeout indicates non-blocking - simply return the 540 | # number of bytes of data actually written 541 | return n 542 | elif not timeout.is_infinite: 543 | # when timeout is set, use select to wait for being ready 544 | # with the time left as timeout 545 | if timeout.expired(): 546 | raise writeTimeoutError 547 | abort, ready, _ = select.select([self.pipe_abort_write_r], [self.fd], [], timeout.time_left()) 548 | if abort: 549 | os.read(self.pipe_abort_write_r, 1000) 550 | break 551 | if not ready: 552 | raise writeTimeoutError 553 | else: 554 | assert timeout.time_left() is None 555 | # wait for write operation 556 | abort, ready, _ = select.select([self.pipe_abort_write_r], [self.fd], [], None) 557 | if abort: 558 | os.read(self.pipe_abort_write_r, 1) 559 | break 560 | if not ready: 561 | raise SerialException('write failed (select)') 562 | d = d[n:] 563 | tx_len -= n 564 | except SerialException: 565 | raise 566 | except OSError as e: 567 | # this is for Python 3.x where select.error is a subclass of 568 | # OSError ignore BlockingIOErrors and EINTR. other errors are shown 569 | # https://www.python.org/dev/peps/pep-0475. 570 | if e.errno not in (errno.EAGAIN, errno.EALREADY, errno.EWOULDBLOCK, errno.EINPROGRESS, errno.EINTR): 571 | raise SerialException('write failed: {}'.format(e)) 572 | except select.error as e: 573 | # this is for Python 2.x 574 | # ignore BlockingIOErrors and EINTR. all errors are shown 575 | # see also http://www.python.org/dev/peps/pep-3151/#select 576 | if e[0] not in (errno.EAGAIN, errno.EALREADY, errno.EWOULDBLOCK, errno.EINPROGRESS, errno.EINTR): 577 | raise SerialException('write failed: {}'.format(e)) 578 | if not timeout.is_non_blocking and timeout.expired(): 579 | raise writeTimeoutError 580 | return length - len(d) 581 | 582 | def flush(self): 583 | """\ 584 | Flush of file like objects. In this case, wait until all data 585 | is written. 586 | """ 587 | if not self.is_open: 588 | raise portNotOpenError 589 | termios.tcdrain(self.fd) 590 | 591 | def reset_input_buffer(self): 592 | """Clear input buffer, discarding all that is in the buffer.""" 593 | if not self.is_open: 594 | raise portNotOpenError 595 | termios.tcflush(self.fd, termios.TCIFLUSH) 596 | 597 | def reset_output_buffer(self): 598 | """\ 599 | Clear output buffer, aborting the current output and discarding all 600 | that is in the buffer. 601 | """ 602 | if not self.is_open: 603 | raise portNotOpenError 604 | termios.tcflush(self.fd, termios.TCOFLUSH) 605 | 606 | def send_break(self, duration=0.25): 607 | """\ 608 | Send break condition. Timed, returns to idle state after given 609 | duration. 610 | """ 611 | if not self.is_open: 612 | raise portNotOpenError 613 | termios.tcsendbreak(self.fd, int(duration / 0.25)) 614 | 615 | def _update_break_state(self): 616 | """\ 617 | Set break: Controls TXD. When active, no transmitting is possible. 618 | """ 619 | if self._break_state: 620 | fcntl.ioctl(self.fd, TIOCSBRK) 621 | else: 622 | fcntl.ioctl(self.fd, TIOCCBRK) 623 | 624 | def _update_rts_state(self): 625 | """Set terminal status line: Request To Send""" 626 | if self._rts_state: 627 | fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str) 628 | else: 629 | fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str) 630 | 631 | def _update_dtr_state(self): 632 | """Set terminal status line: Data Terminal Ready""" 633 | if self._dtr_state: 634 | fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str) 635 | else: 636 | fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str) 637 | 638 | @property 639 | def cts(self): 640 | """Read terminal status line: Clear To Send""" 641 | if not self.is_open: 642 | raise portNotOpenError 643 | s = fcntl.ioctl(self.fd, TIOCMGET, TIOCM_zero_str) 644 | return struct.unpack('I', s)[0] & TIOCM_CTS != 0 645 | 646 | @property 647 | def dsr(self): 648 | """Read terminal status line: Data Set Ready""" 649 | if not self.is_open: 650 | raise portNotOpenError 651 | s = fcntl.ioctl(self.fd, TIOCMGET, TIOCM_zero_str) 652 | return struct.unpack('I', s)[0] & TIOCM_DSR != 0 653 | 654 | @property 655 | def ri(self): 656 | """Read terminal status line: Ring Indicator""" 657 | if not self.is_open: 658 | raise portNotOpenError 659 | s = fcntl.ioctl(self.fd, TIOCMGET, TIOCM_zero_str) 660 | return struct.unpack('I', s)[0] & TIOCM_RI != 0 661 | 662 | @property 663 | def cd(self): 664 | """Read terminal status line: Carrier Detect""" 665 | if not self.is_open: 666 | raise portNotOpenError 667 | s = fcntl.ioctl(self.fd, TIOCMGET, TIOCM_zero_str) 668 | return struct.unpack('I', s)[0] & TIOCM_CD != 0 669 | 670 | # - - platform specific - - - - 671 | 672 | @property 673 | def out_waiting(self): 674 | """Return the number of bytes currently in the output buffer.""" 675 | #~ s = fcntl.ioctl(self.fd, termios.FIONREAD, TIOCM_zero_str) 676 | s = fcntl.ioctl(self.fd, TIOCOUTQ, TIOCM_zero_str) 677 | return struct.unpack('I', s)[0] 678 | 679 | def fileno(self): 680 | """\ 681 | For easier use of the serial port instance with select. 682 | WARNING: this function is not portable to different platforms! 683 | """ 684 | if not self.is_open: 685 | raise portNotOpenError 686 | return self.fd 687 | 688 | def set_input_flow_control(self, enable=True): 689 | """\ 690 | Manually control flow - when software flow control is enabled. 691 | This will send XON (true) or XOFF (false) to the other device. 692 | WARNING: this function is not portable to different platforms! 693 | """ 694 | if not self.is_open: 695 | raise portNotOpenError 696 | if enable: 697 | termios.tcflow(self.fd, termios.TCION) 698 | else: 699 | termios.tcflow(self.fd, termios.TCIOFF) 700 | 701 | def set_output_flow_control(self, enable=True): 702 | """\ 703 | Manually control flow of outgoing data - when hardware or software flow 704 | control is enabled. 705 | WARNING: this function is not portable to different platforms! 706 | """ 707 | if not self.is_open: 708 | raise portNotOpenError 709 | if enable: 710 | termios.tcflow(self.fd, termios.TCOON) 711 | else: 712 | termios.tcflow(self.fd, termios.TCOOFF) 713 | 714 | def nonblocking(self): 715 | """DEPRECATED - has no use""" 716 | import warnings 717 | warnings.warn("nonblocking() has no effect, already nonblocking", DeprecationWarning) 718 | 719 | 720 | class PosixPollSerial(Serial): 721 | """\ 722 | Poll based read implementation. Not all systems support poll properly. 723 | However this one has better handling of errors, such as a device 724 | disconnecting while it's in use (e.g. USB-serial unplugged). 725 | """ 726 | 727 | def read(self, size=1): 728 | """\ 729 | Read size bytes from the serial port. If a timeout is set it may 730 | return less characters as requested. With no timeout it will block 731 | until the requested number of bytes is read. 732 | """ 733 | if not self.is_open: 734 | raise portNotOpenError 735 | read = bytearray() 736 | poll = select.poll() 737 | poll.register(self.fd, select.POLLIN | select.POLLERR | select.POLLHUP | select.POLLNVAL) 738 | if size > 0: 739 | while len(read) < size: 740 | # print "\tread(): size",size, "have", len(read) #debug 741 | # wait until device becomes ready to read (or something fails) 742 | for fd, event in poll.poll(self._timeout * 1000): 743 | if event & (select.POLLERR | select.POLLHUP | select.POLLNVAL): 744 | raise SerialException('device reports error (poll)') 745 | # we don't care if it is select.POLLIN or timeout, that's 746 | # handled below 747 | buf = os.read(self.fd, size - len(read)) 748 | read.extend(buf) 749 | if ((self._timeout is not None and self._timeout >= 0) or 750 | (self._inter_byte_timeout is not None and self._inter_byte_timeout > 0)) and not buf: 751 | break # early abort on timeout 752 | return bytes(read) 753 | 754 | 755 | class VTIMESerial(Serial): 756 | """\ 757 | Implement timeout using vtime of tty device instead of using select. 758 | This means that no inter character timeout can be specified and that 759 | the error handling is degraded. 760 | 761 | Overall timeout is disabled when inter-character timeout is used. 762 | """ 763 | 764 | def _reconfigure_port(self, force_update=True): 765 | """Set communication parameters on opened port.""" 766 | super(VTIMESerial, self)._reconfigure_port() 767 | fcntl.fcntl(self.fd, fcntl.F_SETFL, 0) # clear O_NONBLOCK 768 | 769 | if self._inter_byte_timeout is not None: 770 | vmin = 1 771 | vtime = int(self._inter_byte_timeout * 10) 772 | elif self._timeout is None: 773 | vmin = 1 774 | vtime = 0 775 | else: 776 | vmin = 0 777 | vtime = int(self._timeout * 10) 778 | try: 779 | orig_attr = termios.tcgetattr(self.fd) 780 | iflag, oflag, cflag, lflag, ispeed, ospeed, cc = orig_attr 781 | except termios.error as msg: # if a port is nonexistent but has a /dev file, it'll fail here 782 | raise serial.SerialException("Could not configure port: {}".format(msg)) 783 | 784 | if vtime < 0 or vtime > 255: 785 | raise ValueError('Invalid vtime: {!r}'.format(vtime)) 786 | cc[termios.VTIME] = vtime 787 | cc[termios.VMIN] = vmin 788 | 789 | termios.tcsetattr( 790 | self.fd, 791 | termios.TCSANOW, 792 | [iflag, oflag, cflag, lflag, ispeed, ospeed, cc]) 793 | 794 | def read(self, size=1): 795 | """\ 796 | Read size bytes from the serial port. If a timeout is set it may 797 | return less characters as requested. With no timeout it will block 798 | until the requested number of bytes is read. 799 | """ 800 | if not self.is_open: 801 | raise portNotOpenError 802 | read = bytearray() 803 | while len(read) < size: 804 | buf = os.read(self.fd, size - len(read)) 805 | if not buf: 806 | break 807 | read.extend(buf) 808 | return bytes(read) 809 | 810 | # hack to make hasattr return false 811 | cancel_read = property() 812 | -------------------------------------------------------------------------------- /wxWidgets/wxWidgets.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ###################################################### 4 | # Build script # 5 | # # 6 | # See .info for details # 7 | ###################################################### 8 | 9 | # Export variables needed for compilation 10 | 11 | export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 12 | export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" 13 | 14 | # Configure it 15 | 16 | SRCNAM=wxWidgets-3.1.0.tar.bz2 17 | WRKDIR=wxWidgets-3.1.0 18 | EXTNAM=wxWidgets 19 | TMPDIR=/tmp/wxWidgets 20 | 21 | ###################################################### 22 | # Prepare extension creation # 23 | ###################################################### 24 | 25 | INITIALDIR=$PWD 26 | 27 | # Remove dirs and files left from previous creation 28 | 29 | #rm -r -f $WRKDIR 30 | 31 | rm -r -f $TMPDIR 32 | 33 | # Create temporary directory 34 | 35 | mkdir -p $TMPDIR 36 | 37 | ###################################################### 38 | # Compile extension # 39 | ###################################################### 40 | 41 | # Export variables needed for compilation 42 | 43 | tar -xf $SRCNAM 44 | 45 | # Configure it 46 | 47 | cd $WRKDIR 48 | 49 | ./configure --prefix=/usr/local --disable-precomp-headers 50 | 51 | # Compile 52 | 53 | make 54 | 55 | # Install in base temp dir 56 | 57 | make DESTDIR=$TMPDIR install 58 | 59 | # Delete compilation work directory 60 | 61 | cd .. 62 | rm -r -f $WRKDIR 63 | 64 | # correct symlink 65 | rm $TMPDIR/usr/local/bin/wx-config 66 | ln -fs /usr/local/lib/wx/config/gtk2-unicode-3.1 $TMPDIR/usr/local/bin/wx-config 67 | 68 | # Adjust directory access rigths 69 | 70 | find $TMPDIR/ -type d | xargs chmod -v 755; 71 | 72 | # Strip executables 73 | 74 | find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 75 | 76 | # Move files to doc extension 77 | 78 | mkdir -p $TMPDIR-doc/usr/local/share 79 | mv $TMPDIR/usr/local/share/man $TMPDIR-doc/usr/local/share 80 | mv $TMPDIR/usr/local/share/info $TMPDIR-doc/usr/local/share 81 | 82 | # Move files to dev extension 83 | 84 | mkdir -p $TMPDIR-dev/usr/local/lib 85 | mv $TMPDIR/usr/local/lib/*.a $TMPDIR-dev/usr/local/lib 86 | mv $TMPDIR/usr/local/lib/*.la $TMPDIR-dev/usr/local/lib 87 | mv $TMPDIR/usr/local/lib/pkgconfig $TMPDIR-dev/usr/local/lib 88 | mv $TMPDIR/usr/local/lib/wx $TMPDIR-dev/usr/local/lib 89 | mv $TMPDIR/usr/local/include $TMPDIR-dev/usr/local 90 | 91 | 92 | # Move files to locale extension 93 | 94 | mkdir -p $TMPDIR-locale/usr/local/share 95 | mv $TMPDIR/usr/local/share/locale $TMPDIR-locale/usr/local/share 96 | 97 | mv $TMPDIR/usr/local/share $TMPDIR-dev/usr/local 98 | 99 | ################################################### 100 | # Create base extension in temp dir # 101 | ################################################### 102 | 103 | cd $TMPDIR 104 | cd .. 105 | mksquashfs $TMPDIR $EXTNAM.tcz 106 | cd $TMPDIR 107 | find usr -not -type d > $EXTNAM.tcz.list 108 | mv ../$EXTNAM.tcz . 109 | 110 | # Create md5 file 111 | 112 | md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt 113 | 114 | sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional 115 | 116 | # Cleanup temp directory 117 | 118 | rm -rf * 119 | 120 | ################################################### 121 | # Create doc extension in temp dir # 122 | ################################################### 123 | 124 | cd $TMPDIR-doc 125 | cd .. 126 | mksquashfs $TMPDIR-doc $EXTNAM-doc.tcz 127 | cd $TMPDIR-doc 128 | find usr -not -type d > $EXTNAM-doc.tcz.list 129 | mv ../$EXTNAM-doc.tcz . 130 | 131 | # Create md5 file 132 | 133 | md5sum $EXTNAM-doc.tcz > $EXTNAM-doc.tcz.md5.txt 134 | 135 | sudo cp -v $EXTNAM-doc.tcz* /mnt/mmcblk0p2/tce/optional 136 | 137 | # Cleanup temp directory 138 | 139 | rm -rf * 140 | 141 | ################################################### 142 | # Create dev extension in temp dir # 143 | ################################################### 144 | 145 | cd $TMPDIR-dev 146 | cd .. 147 | mksquashfs $TMPDIR-dev $EXTNAM-dev.tcz 148 | cd $TMPDIR-dev 149 | find usr -not -type d > $EXTNAM-dev.tcz.list 150 | mv ../$EXTNAM-dev.tcz . 151 | 152 | # Create md5 file 153 | 154 | md5sum $EXTNAM-dev.tcz > $EXTNAM-dev.tcz.md5.txt 155 | 156 | sudo cp -v $EXTNAM-dev.tcz* /mnt/mmcblk0p2/tce/optional 157 | 158 | # Cleanup temp directory 159 | 160 | rm -rf * 161 | 162 | ################################################### 163 | # Create locale extension in temp dir # 164 | ################################################### 165 | 166 | cd $TMPDIR-locale 167 | cd .. 168 | mksquashfs $TMPDIR-locale $EXTNAM-locale.tcz 169 | cd $TMPDIR-locale 170 | find usr -not -type d > $EXTNAM-locale.tcz.list 171 | mv ../$EXTNAM-locale.tcz . 172 | 173 | # Create md5 file 174 | 175 | md5sum $EXTNAM-locale.tcz > $EXTNAM-locale.tcz.md5.txt 176 | 177 | sudo cp -v $EXTNAM-locale.tcz* /mnt/mmcblk0p2/tce/optional 178 | 179 | # Cleanup temp directory 180 | 181 | rm -rf * 182 | 183 | cd $INITIALDIR 184 | --------------------------------------------------------------------------------