forked from istopwg/ippsample
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
85 lines (79 loc) · 5.67 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
language: cpp
compiler: gcc
sudo: require
dist: xenial
before_install:
- sudo add-apt-repository -y ppa:ximion/packagekit
- sudo apt-get update
install:
- sudo apt-get -y install appstream coreutils autoconf build-essential avahi-daemon avahi-utils libavahi-client-dev libgnutls28-dev libjpeg-dev libnss-mdns libpng-dev zlib1g-dev mupdf
script:
- ./configure --prefix=/usr
- make -j$(nproc)
- cd man ; make ; cd - # HTML files are not built+installed by default
- make BUILDROOT=$(readlink -f appdir) install
- mkdir -p ./appdir/usr/share/doc/html/ipptool ; cp man/*.html ./appdir/usr/share/doc/html/ipptool/
- mkdir -p ./appdir/usr/share/man/man{1,5,7,8} ;
- #cp man/*.1 ./appdir/usr/share/man/man1/ ;
- #cp man/*.5 ./appdir/usr/share/man/man5/ ;
- #cp man/*.7 ./appdir/usr/share/man/man7/ ;
- #cp man/*.8 ./appdir/usr/share/man/man8/ ;
- find . -type f -name "*.txt" -exec cp {} ./appdir/ \;
- find . -type f -name "*.md" -exec cp {} ./appdir/ \;
- find . -type f -name README -exec cp {} ./appdir/ \;
- find appdir/
- #rm -rf appdir/usr/include/cups/ # Do not bundle developer stuff
- sudo mv ./appdir/usr/sbin/* ./appdir/usr/bin/ ; rm -rf ./appdir/usr/sbin/ # AppRun does not put usr/sbin/ on $PATH
- mkdir -p ./appdir/usr/share/applications/ ; cp ./appimage/ippsample.desktop ./appdir/usr/share/applications/
- mkdir -p ./appdir/usr/share/icons/hicolor/512x512/apps/ ; cp ./appimage/printer.png ./appdir/usr/share/icons/hicolor/512x512/apps/
- mkdir -p ./appdir/usr/share/metainfo ; cp ./appimage/ippsample.appdata.xml ./appdir/usr/share/metainfo/
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage
- ./linuxdeployqt*.AppImage --appimage-version
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=3
- # In addition to the main executable, we have additional ones to process
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/ippfind -bundle-non-qt-libs -verbose=3
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/ippproxy -bundle-non-qt-libs -verbose=3
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/ipptool -bundle-non-qt-libs -verbose=3
- #./linuxdeployqt*.AppImage ./appdir/usr/bin/ipptransform -bundle-non-qt-libs -verbose=2
- #./linuxdeployqt*.AppImage ./appdir/usr/bin/ipptransform3d -bundle-non-qt-libs -verbose=2
- # Bundle examples/ and test/
- mkdir -p ./appdir/usr/share/cups/ipptool/ ; cp -r examples/* test/* ./appdir/usr/share/cups/ipptool/ ; cp -r examples2/* test/* ./appdir/usr/share/cups/ipptool/
- # Generate AppImage
- ./linuxdeployqt*.AppImage --appimage-extract
- rm ./appdir/AppRun ; cp appimage/AppRun appdir/ ; chmod a+x ./appdir/AppRun # Replace symlink with custom AppRun script
- find ./appdir -name "*.desktop"
- cp ./appdir/usr/share/applications/ippsample.desktop ./appdir/
- cp ./appdir/usr/share/icons/hicolor/512x512/apps/printer.png ./appdir/ippsample.png
- ARCH=x86_64 PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool -v -u 'gh-releases-zsync|KurtPfeifle|ippsample|continuous|ippsample-*x86_64.AppImage.zsync' -n ./appdir/
after_success:
- find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- find . -name "ipp*.AppImage"
- mv ./ippserver*.AppImage ./ippsample-xperimental-x86_64.AppImage || echo "No ippserver*.AppImage"
- mv ./ippserver*.AppImage.zsync ./ippsample-xperimental-x86_64.AppImage.zsync || echo "No ippserver*.AppImage"
- mv ./ippsample*.AppImage ./ippsample-xperimental-x86_64.AppImage || echo "No ippsample*.AppImage"
- mv ./ippsample*.AppImage.zsync ./ippsample-xperimental-x86_64.AppImage.zsync || echo "No ippsample*.AppImage"
- cp ./ippsample-xperimental{,-$(git rev-parse --short HEAD)}-x86_64.AppImage
- cp ./ippsample-xperimental{,-$(git rev-parse --short HEAD)}-x86_64.AppImage.zsync
- curl --upload-file ./ippsample-xperimental-x86_64.AppImage https://transfer.sh/ippsample-xperimental-x86_64.AppImage
- curl --upload-file ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage https://transfer.sh/ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- ls -lh ./*.AppImage
- sha512sum ./ippsample-xperimental-x86_64.AppImage > ./ippsample-xperimental-x86_64.AppImage.sha512
- md5sum ./ippsample-xperimental-x86_64.AppImage > ./ippsample-xperimental-x86_64.AppImage.md5
- find . -name "*.AppImage*"
- bash ./upload.sh ./ippsample-xperimental-x86_64.AppImage
- bash ./upload.sh ./ippsample-xperimental-x86_64.AppImage.sha512
- bash ./upload.sh ./ippsample-xperimental-x86_64.AppImage.zsync
- cp ./ippsample-xperimental-x86_64.AppImage ./ippsample-x86_64.AppImage
- mv ./ippsample-xperimental-x86_64.AppImage ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage
- sha512sum ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage > ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage.sha512
- md5sum ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage > ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage.md5
- bash ./upload.sh ./ippsample-x86_64.AppImage
- bash ./upload.sh ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage
- bash ./upload.sh ./ippsample-xperimental-$(git rev-parse --short HEAD)-x86_64.AppImage.sha512
- bash ./upload.sh ./ippsample-xperimental-*$(git rev-parse --short HEAD)-x86_64.AppImage.zsync
- find . -name "*.AppImage*"
branches:
only:
- master