Files
s390-tools/zfcpdump/Makefile
Frank Heimes 26d7eed0aa zfcpdump: Do not save timestamps when compressing
Having timestamps in gzip leads to lintian warning
'package-contains-timestamped-gzip' and will harm reproducible builds.
Gzip option '-n' avoids saving original file name and especially timestamps
by default.

Fixes: https://github.com/ibm-s390-linux/s390-tools/pull/169
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
[seiden@linux.ibm.com: Fix commit message]
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2024-06-24 16:23:13 +02:00

59 lines
1.2 KiB
Makefile

include ../common.mak
CPIOINIT = $(call echocmd," CPIOINI ",/$@)./cpioinit
INSTALL_SCRIPTS = 10-zfcpdump.install
ALL_CFLAGS += -fno-sanitize=all
ALL_LDFLAGS += -fno-sanitize=all
ifeq (${HAVE_LIBC_STATIC},0)
all:
$(SKIP) HAVE_LIBC_STATIC=0
install:
$(SKIP) HAVE_LIBC_STATIC=0
else
check_dep:
$(call check_dep, \
"zfcpdump", \
"stdio.h", \
"glibc-static or libc-dev", \
"HAVE_LIBC_STATIC=0", \
"-static")
all: check_dep $(ZFCPDUMP_INITRD) scripts
cpioinit: cpioinit.c
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ $^
zfcpdump_part: zfcpdump.o zfcpdump_part.o
$(LINK) $(ALL_LDFLAGS) $^ -static -o $@
$(STRIP) -s $@
$(ZFCPDUMP_INITRD): cpioinit zfcpdump_part
$(CPIOINIT) zfcpdump_part > $@.tmp
$(GZIP) -f -n $@.tmp
$(MV) $@.tmp.gz $(ZFCPDUMP_INITRD)
scripts: $(INSTALL_SCRIPTS)
chmod +x $(INSTALL_SCRIPTS)
install: all
$(INSTALL) -m 611 $(ZFCPDUMP_INITRD) $(DESTDIR)$(ZFCPDUMP_DIR)
%: %.in
zfcpdump_image=$(ZFCPDUMP_DIR)/$(ZFCPDUMP_IMAGE); \
$(SED) -e "s#@zfcpdump_image@#$$zfcpdump_image#g" \
-e "s#@flavor@#$(ZFCPDUMP_FLAVOR)#g" \
< $< > $@
endif
clean:
rm -f *.o *.gz *.tmp *~ zfcpdump_part cpioinit $(ZFCPDUMP_INITRD) \
$(INSTALL_SCRIPTS)
.PHONY: all clean install check_dep scripts