-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappimage.yml
57 lines (54 loc) · 2.31 KB
/
appimage.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
app: admin-tools
build:
packages:
- rpmdevtools
ingredients:
packages:
- yast2-ncurses
- perl-Config-Crontab
- gamin-server
- yast2-xml
- bind-libs
- samba-libs
- python3-six
- libcrypt1
- cyrus-sasl-gssapi
- yast2-aduc
- yast2-adsi
- yast2-gpmc
- yast2-dns-manager
- util-linux
- samba-python3
- samba-ad-dc
script:
# Reinstall perl
- rpm -r $BUILD_APPDIR -i /usr/src/packages/admin-tools-*/.build.binaries/perl.rpm /usr/src/packages/admin-tools-*/.build.binaries/perl-base.rpm --nodeps
# Extract libnsl.so.1 dependency from glibc
- rpmpeek /usr/src/packages/admin-tools-*/.build.binaries/glibc.rpm cp ./lib64/libnsl.so.1 $BUILD_APPDIR/lib64/
# Put y2base in our path
- rm -rf $BUILD_APPDIR/usr/bin
- mkdir $BUILD_APPDIR/usr/bin
- ln -s ../lib/YaST2/bin/y2base usr/bin/y2base
# Make binaries relocatable
- pushd usr && find . -type f -exec sed -i -e 's#/usr#././#g' {} \; && popd
# Cleanup python2
- find $BUILD_APPDIR/ -name python2* -exec rm -rf {} +
# More cleanup
- rm -rf $BUILD_APPDIR/etc $BUILD_APPDIR/var $BUILD_APPDIR/root $BUILD_APPDIR/sbin $BUILD_APPDIR/run $BUILD_APPDIR/dev $BUILD_APPDIR/usr/src $BUILD_APPDIR/usr/include $BUILD_APPDIR/usr/sbin $BUILD_APPDIR/bin
- pushd $BUILD_APPDIR/usr/share && ls | grep -v YaST2 | xargs rm -rf && popd
# Make sure kerberos tools are in the path
- ln -s usr/lib/mit/bin ./
# Create the desktop file
- echo "[Desktop Entry]" > $BUILD_APPDIR/admin-tools.desktop
- echo "Name=admin-tools" >> $BUILD_APPDIR/admin-tools.desktop
- echo "Exec=y2base admin-tools ncurses" >> $BUILD_APPDIR/admin-tools.desktop
- echo "Terminal=true" >> $BUILD_APPDIR/admin-tools.desktop
- echo "Icon=admin-tools" >> $BUILD_APPDIR/admin-tools.desktop
- echo "Type=Application" >> $BUILD_APPDIR/admin-tools.desktop
- echo "Categories=Settings" >> $BUILD_APPDIR/admin-tools.desktop
- cp $BUILD_SOURCE_DIR/admin-tools.py $BUILD_APPDIR/usr/share/YaST2/clients/
- mkdir -p $BUILD_APPDIR/usr/share/metainfo
- cp $BUILD_SOURCE_DIR/admin-tools.appdata.xml $BUILD_APPDIR/usr/share/metainfo/
- cp $BUILD_SOURCE_DIR/_icon $BUILD_APPDIR/admin-tools.png
- cp $BUILD_SOURCE_DIR/*appimageupdatetool-x86_64.AppImage $BUILD_APPDIR/usr/bin/appimageupdatetool
- chmod a+x $BUILD_APPDIR/usr/bin/appimageupdatetool