forked from pool/appimaged
Adrian Schröter
1254ce4a6f
OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/appimaged?expand=0&rev=2
109 lines
3.3 KiB
RPMSpec
109 lines
3.3 KiB
RPMSpec
#
|
|
# 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: appimaged
|
|
Version: 9~pre.1495805837.d05eac1
|
|
Release: 0
|
|
License: MIT
|
|
Url: http://www.appimage.org
|
|
Summary: Daemon handles (un)registering AppImages with the system
|
|
Group: System/Daemons
|
|
Source0: AppImageKit-%version.tar.xz
|
|
Source1: appimaged.service
|
|
BuildRequires: glib2-devel libpng-devel
|
|
BuildRequires: inotify-tools-devel
|
|
BuildRequires: cairo-devel
|
|
BuildRequires: fuse-devel
|
|
BuildRequires: xz-devel
|
|
BuildRequires: libarchive-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: squashfs
|
|
BuildRequires: libtool
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
|
|
Requires: zsync
|
|
|
|
%description
|
|
appimaged is a daemon that handles registering and unregistering AppImages
|
|
with the system (e.g., menu entries, icons, MIME types, binary delta updates,
|
|
and such).
|
|
|
|
The package comes also with appimage.validate CLI tool to verify signature
|
|
of AppImage files.
|
|
|
|
|
|
%prep
|
|
%setup -q -n AppImageKit-%version
|
|
sed -i -e s,^version=.*,version=%version, build.sh
|
|
|
|
%build
|
|
export PATH=$PWD/bin:$PATH
|
|
cd squashfuse
|
|
patch -p1 < ../squashfuse.patch
|
|
export ACLOCAL_FLAGS="-I /usr/share/aclocal"
|
|
libtoolize --force
|
|
aclocal
|
|
autoheader
|
|
automake --force-missing --add-missing
|
|
autoreconf -fi || true # Errors out, but the following succeeds then?
|
|
autoconf
|
|
sed -i '/PKG_CHECK_MODULES.*/,/,:./d' configure # https://github.com/vasi/squashfuse/issues/12
|
|
./configure --disable-demo --disable-high-level --without-lzo --without-lz4
|
|
make
|
|
cd ..
|
|
|
|
CC=gcc
|
|
$CC -std=gnu99 -o appimaged -I./squashfuse/ ./getsection.c ./notify.c ./elf.c ./appimaged.c \
|
|
-D_FILE_OFFSET_BITS=64 -DHAVE_LIBARCHIVE3=0 -DVERSION_NUMBER=\"%version\" \
|
|
./squashfuse/.libs/libsquashfuse.a ./squashfuse/.libs/libfuseprivate.a \
|
|
-Wl,-Bdynamic -linotifytools -larchive \
|
|
-Wl,--as-needed \
|
|
$(pkg-config --cflags --libs glib-2.0) \
|
|
$(pkg-config --cflags --libs gio-2.0) \
|
|
$(pkg-config --cflags --libs cairo) \
|
|
-ldl -lpthread -lz -llzma
|
|
|
|
# basic tool for validation
|
|
$CC -o appimage.validate ./getsection.c ./validate.c -Wl,-Bdynamic -lssl -lcrypto \
|
|
-Wl,--as-needed $(pkg-config --cflags --libs glib-2.0) -lz -ldl
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
install -m 0755 appimaged appimage.validate %{buildroot}%{_bindir}
|
|
|
|
# install systemd per user service
|
|
mkdir -p %{buildroot}%{_userunitdir}
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/appimaged.service
|
|
|
|
%post
|
|
%systemd_user_post appimaged.service
|
|
|
|
%preun
|
|
%systemd_user_preun appimaged.service
|
|
|
|
%postun
|
|
%systemd_user_postun appimaged.service
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc LICENSE README.md
|
|
%{_bindir}/appimage.validate
|
|
%{_bindir}/appimaged
|
|
%{_userunitdir}/appimaged.service
|
|
|