archive: kernel/config-x86_64_generic: Try to provide a more complete and generic...
[dragora.git] / recipes / tools / emacs / recipe
blob64ca09e49ab3ce1570f646781025be820be10acf
1 # Build recipe for emacs.
3 # Copyright (C) 2020 Kevin "The Nuclear" Bloom, <kevin.bloom@posteo.net>
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 # Based on recipes written by Mateus P. Rodrigues, <mprodrigues@dragora.org>
18 # and Matias Fonzo, <selk@dragora.org>.
20 program=emacs
21 version=26.3
22 release=1
24 tarname=${program}-${version}.tar.xz
25 # srcdir=${program}-${version}    # Not needed in major releases
27 # Remote source(s)
28 fetch=http://ftp.gnu.org/gnu/emacs/$tarname
30 description="
31 emacs - The Emacs text editor.
33 GNU Emacs is an extensible, customizable text editor and more.
34 At its core is an interpreter for Emacs Lisp, a dialect of the
35 Lisp programming language with extensions to support text
36 editing.
39 homepage=http://www.gnu.org/software/emacs/
40 license="GPLv3+"
42 # Source documentation
43 docs="BUGS CONTRIBUTE COPYING ChangeLog* README"
44 docsdir="${docdir}/${program}-${version}"
46 build()
48     set -e
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
55     $configure_args \
56     --libdir=/usr/lib${libSuffix} \
57     --infodir=$infodir \
58     --mandir=$mandir \
59     --docdir=$docdir \
60     --with-x \
61     --build="$(cc -dumpmachine)"
63     make -j${jobs} V=1
64     make -j${jobs} DESTDIR="$destdir" install
66     # Delete index file for the package
67     if test -d "${destdir}/$infodir"
68     then
69         rm -f "${destdir}/${infodir}/dir"
70     fi
72     # Copy documentation
73     mkdir -p "${destdir}${docsdir}"
75     for file in $docs
76     do
77         if test -e $file
78         then
79             cp -p $file "${destdir}${docsdir}"
80         fi
81     done