jhead: make sure our compiler flags are used

To fix compilation in ubuntu21 docker image.

Also patch installation step in makefile to avoid us having to
override termux_step_make_install.
This commit is contained in:
Henrik Grimler 2022-02-04 08:22:54 +01:00
parent a2c19ad045
commit 79e22923b7
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 24 additions and 5 deletions

View File

@ -3,11 +3,7 @@ TERMUX_PKG_DESCRIPTION="Exif Jpeg header manipulation tool"
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.04
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://www.sentex.net/~mwandel/jhead/jhead-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm700 jhead $TERMUX_PREFIX/bin/jhead
install -Dm600 jhead.1 $TERMUX_PREFIX/share/man/man1/jhead.1
}

View File

@ -0,0 +1,23 @@
--- ../makefile.orig 2022-02-04 07:15:35.023914372 +0000
+++ ./makefile 2022-02-04 07:16:53.153727804 +0000
@@ -3,9 +3,9 @@
#--------------------------------
OBJ=.
SRC=.
-CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
-LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+CPPFLAGS?=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS?=$(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS?=$(shell dpkg-buildflags --get LDFLAGS)
all: jhead
@@ -22,4 +22,6 @@
rm -f $(objs) jhead
install:
- cp jhead ${DESTDIR}/usr/bin/
+ install -Dm700 jhead ${DESTDIR}$(PREFIX)/bin/
+ mkdir -p ${DESTDIR}$(PREFIX)/share/man/man1/
+ install -m600 jhead.1 ${DESTDIR}$(PREFIX)/share/man/man1/