summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Packaging/appimage/Dockerfile19
-rw-r--r--Swift/Packaging/appimage/build.sh26
-rw-r--r--Swift/Packaging/appimage/centos6.sh25
-rw-r--r--Swift/Packaging/appimage/config.py1
-rwxr-xr-xSwift/Packaging/appimage/run.sh2
-rw-r--r--Swift/Packaging/appimage/swift.yml12
6 files changed, 85 insertions, 0 deletions
diff --git a/Swift/Packaging/appimage/Dockerfile b/Swift/Packaging/appimage/Dockerfile
new file mode 100644
index 0000000..37530d1
--- /dev/null
+++ b/Swift/Packaging/appimage/Dockerfile
@@ -0,0 +1,19 @@
+FROM centos:6
+
+RUN yum -y install epel-release wget
+RUN wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo && yum -y upgrade
+RUN yum -y install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ openssl-devel qt5-qtbase-devel qt5-qttools-libs-designercomponents qt5-qttools-devel qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel qt5-qttools-static qt5-qtmultimedia-devel qt5-qtwebchannel-devel qt5-qtimageformats-devel git patch qt5-qtmultimedia-devel qt5-qtx11extras-devel libtool
+RUN cd / && git clone https://github.com/swift/swift
+#RUN cd / && git clone --depth 1 https://github.com/probonopd/AppImageKit.git
+#RUN cd /AppImageKit && scl enable devtoolset-2 ./build.sh
+RUN cd / && wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimaged-x86_64.AppImage && chmod u+rx /appimaged-x86_64.AppImage
+RUN yum -y install fuse-libs libarchive
+RUN ln -s /usr/lib64/libarchive.so.2 /usr/lib64/libarchive.so.13
+RUN cd / && wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage && chmod u+x appimagetool-x86_64.AppImage
+RUN cd / && wget https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe
+RUN yum -y install desktop-file-utils
+ADD build.sh /build.sh
+RUN chmod u+x /build.sh
+#RUN cd /swift && scl enable devtoolset-2 './scons max_jobs=1'
+ADD swift.yml /swift.yml
+ADD config.py /swift/config.py
diff --git a/Swift/Packaging/appimage/build.sh b/Swift/Packaging/appimage/build.sh
new file mode 100644
index 0000000..53264fc
--- /dev/null
+++ b/Swift/Packaging/appimage/build.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+SIXTYFOUR=''
+cd /swift
+git pull --rebase
+mkdir -p /build
+#scl enable devtoolset-2 './scons max_jobs=1 SWIFT_INSTALLDIR=/build /build'
+./scons max_jobs=1 SWIFT_INSTALLDIR=/build /build
+cd /build
+ldd bin/swift-im | grep '=>' | awk '{print $3}' | xargs -I '{}' cp -v -L '{}' ./lib/ || true
+mkdir -p lib/qt5
+cp -r /usr/lib${SIXTYFOUR}/qt5/plugins ./lib/qt5/plugins
+cp -L /lib${SIXTYFOUR}/libudev.so.0 ./lib/
+cp /usr/lib${SIXTYFOUR}/libQt5XcbQpa.so* ./lib/
+cp -L /usr/local/gcc-4.9.4/lib/libstdc++.so.6 ./lib/
+mkdir -p /appstuff
+cd /appstuff
+bash -ex /Recipe /swift.yml
+cd /appstuff/Swift/Swift.AppDir
+rm AppRun
+wget -c https://github.com/probonopd/AppImageKit/releases/download/6/AppRun_6-i686 -O AppRun
+chmod +x AppRun
+cd ..
+rm appimagetool
+wget -c https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage -O appimagetool
+chmod +x appimagetool
+./appimagetool Swift.AppDir Swift-i686.AppImage
diff --git a/Swift/Packaging/appimage/centos6.sh b/Swift/Packaging/appimage/centos6.sh
new file mode 100644
index 0000000..0f27819
--- /dev/null
+++ b/Swift/Packaging/appimage/centos6.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+yum -y install epel-release wget
+# devtools turns out not to work, but it's a step I did so I'm recording it.
+wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo && yum -y upgrade
+yum -y install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ openssl-devel qt5-qtbase-devel qt5-qttools-libs-designercomponents qt5-qttools-devel qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel qt5-qttools-static qt5-qtmultimedia-devel qt5-qtwebchannel-devel qt5-qtimageformats-devel git patch qt5-qtmultimedia-devel qt5-qtx11extras-devel libtool fuse-libs libarchive desktop-file-utils gcc-c++
+cd /
+wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage
+chmod u+rx /appimagetool-i686.AppImage
+wget https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe
+yum -y install svn texinfo-tex flex zip libgcc.i686 glibc-devel.i686
+mkdir -p /usr/local/src
+cd /usr/local/src
+svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_4_release/
+cd gcc_4_9_4_release
+./contrib/download_prerequisites
+mkdir release_build
+cd release_build
+../configure --prefix=/usr/local/gcc-4.9.4
+make
+make install
+echo "/usr/local/gcc-4.9.4/lib" > /etc/ld.so.conf.d/newgcc.conf
+echo 'export PATH=/usr/local/gcc-4.9.4/bin:$PATH' >> /etc/profile
+cd /
+git clone https://github.com/swift/swift
+# Run build.sh
diff --git a/Swift/Packaging/appimage/config.py b/Swift/Packaging/appimage/config.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Swift/Packaging/appimage/config.py
@@ -0,0 +1 @@
+
diff --git a/Swift/Packaging/appimage/run.sh b/Swift/Packaging/appimage/run.sh
new file mode 100755
index 0000000..2d90490
--- /dev/null
+++ b/Swift/Packaging/appimage/run.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+docker build -t swiftbuild .
diff --git a/Swift/Packaging/appimage/swift.yml b/Swift/Packaging/appimage/swift.yml
new file mode 100644
index 0000000..b873baf
--- /dev/null
+++ b/Swift/Packaging/appimage/swift.yml
@@ -0,0 +1,12 @@
+app: Swift
+
+# ingredients:
+# script:
+# - cp -r /build/* usr/
+script:
+ - cp -r /build/* usr/
+ - strip usr/bin/*
+ - cp /build/share/applications/swift.desktop .
+ - cp /build/share/pixmaps/swift.xpm .
+# post:
+# - cp -r /build/lib/* usr/lib/