File appimage.yml of Package admin-tools

app: admin-tools

build:
  packages:
    - rpmdevtools

ingredients:
  packages:
    - libyui-ncurses
    - perl-Config-Crontab
    - gamin-server
    - yast2-xml
    - bind-libs
    - samba-libs
    - python3-six
    - libcrypt1
    - libisc1606
    - cyrus-sasl-gssapi
    - yast2-aduc
    - yast2-adsi
    - yast2-gpmc
    - yast2-dns-manager
    - util-linux
    - samba-python3
    - samba-ad-dc
    - wicked-service

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/_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
openSUSE Build Service is sponsored by