recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / x-apps / spacefm / recipe
blob60858550c26e755a19114e435b5dede9c7d716b6
1 # Build recipe for spacefm.
3 # Copyright (c) 2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 program=spacefm
18 version=20180304_e6f2918
19 release=2
21 # Define a category for the output of the package name
22 pkgcategory=x-apps
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 fetch="
28  http://rsync.dragora.org/current/sources/$tarname
29  http://mirror.cedia.org.ec/dragora/current/sources/$tarname
32 description="
33 SpaceFM file manager.
35 SpaceFM is a multi-panel tabbed file and desktop manager for GNU/Linux
36 with built-in VFS, udev- or HAL-based device manager, customisable menu
37 system, and bash-GTK integration. SpaceFM aims to provide a stable,
38 capable file manager with significant customisation capabilities.
41 homepage=http://ignorantguru.github.io/spacefm/
42 license="GPLv3+, LGPLv3"
44 # Source documentation
45 docs="AUTHORS COPYING* ChangeLog NEWS README"
46 docsdir="${docdir}/${program}-${version}"
48 # This build system does not support parallel jobs
49 jobs=1
51 build()
53     set -e
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Update for hosts based on musl
60     cp -f "${worktree}/archive/common/config.guess" config.guess
61     cp -f "${worktree}/archive/common/config.sub" config.sub
63     patch -Np1 -i "${worktree}/patches/spacefm/spacefm-include-sysmacros.patch"
65     # Set sane permissions
66     chmod -R u+w,go-w,a+rX-s .
68     # TODO: --enable-video-thumbnails requires FFmpeg
70     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
71      $configure_args \
72      --libdir=/usr/lib${libSuffix} \
73      --mandir=$mandir \
74      --docdir=$docsdir \
75      --enable-static=no \
76      --enable-shared=yes \
77      --disable-video-thumbnails \
78      --with-gtk3 \
79      --build="$(cc -dumpmachine)"
81     make -j${jobs} V=1
82     make -j${jobs} DESTDIR="$destdir" install-strip
84     # To handle (dot) .new files via graft(1)
85     touch "${destdir}/etc/spacefm/.graft-config"
87     # Compress and link man pages (if needed)
88     if test -d "${destdir}/$mandir"
89     then
90         (
91             cd "${destdir}/$mandir"
92             find . -type f -exec lzip -9 '{}' +
93             find . -type l | while read -r file
94             do
95                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96                 rm -- "$file"
97             done
98         )
99     fi
101     # Copy documentation
102     mkdir -p "${destdir}${docsdir}"
103     cp -p $docs "${destdir}${docsdir}"