File build-pkg2appimage.spec of Package build-pkg2appimage
#
# spec file for package
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: build-pkg2appimage
Version: 0
Release: 0
License: MIT
Summary: OBS build script plugin to create AppImage
Group: Definition/Libraries/C and C++
Url: https://github.com/probonopd/AppImageKit/wiki/Using-Open-Build-Service
Source0: pkg2appimage
Source1: https://github.com/probonopd/AppImages/raw/master/functions.sh
Source3: functions.sh.patch
#Source4: desktopintegration
Source5: excludelist
Source6: excludesuselist
# osc buildinfo toolchain x86_64 -x libX11-devel | sed -n 's,.*bdep name="\([^"]*\)".*,\1,p'
Source7: assumed_base_os_leap_42.1
Source8: appimage.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: appimagetool
Requires: linuxdeployqt
Requires: desktop-file-utils
Requires: zsync
Requires: AppStream
# required workaround until --ignoreignore--
%if 0%{?sle_version} == 120400
Requires: sles-release
Requires: sles-release-POOL
%else
Requires: openSUSE-release
Requires: openSUSE-release-ftp
%endif
Requires: zypper
Requires: createrepo-implementation
# workaround for packaging problems elsewhere
Requires: glib2-tools
Requires: mkinitrd
#ExclusiveArch: x86_64 %ix86
%description
NOTE: this is still in the just-hacked-together way
%prep
%build
%install
mkdir -p $RPM_BUILD_ROOT/usr/lib/appimagetool
cp -av %{S:0} %{S:1} %{S:5} $RPM_BUILD_ROOT/usr/lib/appimagetool/
sort %{S:6} %{S:7} | uniq > $RPM_BUILD_ROOT/usr/lib/appimagetool/excludesuselist
# currently hand maintained list of de-install packages:
for i in cracklib-dict-small dbus-1 dbus-1-glib dbus-1-x11 device-mapper dracut \
elfutils expat fipscheck hardlink kbd kmod kmod-compat krb5-mini \
Mesa-libEGL1 Mesa-libglapi0 netcfg openSUSE-release openSUSE-release-ftp \
pam-config pango-tools shadow shared-mime-info suse-module-tools systemd \
systemd-presets-branding-openSUSE systemd-sysvinit sysvinit-tools \
timezone udev libLLVM \
cups-libs gconf2 libasm1 libavahi-client3 libavahi-common3 libcairo2 libcdda_interface0 libcdda_paranoia0 \
libcryptsetup4 libdrm_amdgpu1 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libdw1 libgbm1 libgcrypt20 \
libgeoclue0 libgirepository-1_0-1 libgmodule-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0 \
libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 \
libgthread-2_0-0 libgypsy0 libharfbuzz0 libinput10 libkmod2 libmtdev1 liborc-0_4-0 libpango-1_0-0 \
libpciaccess0 libpixman-1-0 libqrencode3 libseccomp2 libts-1_0-0 libwayland-client0 libwayland-server0 \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-util1 libXcomposite1 \
libXdamage1 libXext6 libXfixes3 libXft2 libXi6 libxkbcommon0 libxkbcommon-x11-0 libXrender1 \
libxshmfence1 libxslt1 libXv1 libXxf86vm1
do
echo "$i" >> $RPM_BUILD_ROOT/usr/lib/appimagetool/excludesuselist
done
cd $RPM_BUILD_ROOT/usr/lib/appimagetool/
patch -p0 < %{S:3}
rm -f functions.sh.orig
cd -
# icon ... eg. for a console application desktop file
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
cp %{S:8} $RPM_BUILD_ROOT/usr/share/pixmaps/
%files
%defattr(-,root,root)
%dir /usr/lib/appimagetool
#/usr/lib/appimagetool/desktopintegration
/usr/lib/appimagetool/exclude*
/usr/lib/appimagetool/functions.sh
%attr(0755,root,root) /usr/lib/appimagetool/pkg2appimage
/usr/share/pixmaps