aboutsummaryrefslogtreecommitdiff
path: root/sub/socklog/Makefile
blob: 003d61395c42b4455462d3ddebc73c479fb1de29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
SOCKLOG_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),-static,)

$(OUTPUT)/sources/socklog-2.1.0.tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget http://smarden.org/socklog/socklog-2.1.0.tar.gz

$(OUTPUT)/sources/.lh_socklog_dled: $(OUTPUT)/sources/socklog-2.1.0.tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-host/.lh_socklog_copied: $(OUTPUT)/sources/.lh_socklog_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/package/admin/socklog-2.1.0
	exec setuidgid $(NORMALUSER) s6-mkdir -p -- $(OUTPUT)/build-host/package
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/package tar -zxpvf $(OUTPUT)/sources/socklog-2.1.0.tar.gz
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-host/.lh_socklog_patched: $(OUTPUT)/build-host/.lh_socklog_copied sub/socklog/patch.sed | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/Makefile.patched sed -f sub/socklog/patch.sed $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/Makefile
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-host/.lh_socklog_configured: $(OUTPUT)/build-host/.lh_socklog_copied | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/conf-cc s6-echo "$(BUILD_HOST_CC) -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h"
	exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/conf-ld s6-echo "$(BUILD_HOST_CC) $(SOCKLOG_STATIC)"
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-host/.lh_socklog_built: $(OUTPUT)/build-host/.lh_socklog_configured $(OUTPUT)/build-host/.lh_socklog_patched | $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src $(MAKE) -f Makefile.patched socklog
	exec setuidgid $(NORMALUSER) s6-touch $@

$(OUTPUT)/build-host/.lh_socklog_installed: $(OUTPUT)/build-host/.lh_socklog_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
	exec s6-mkdir -p -m 0755 $(OUTPUT)/rootfs/package/admin/socklog-2.1.0/command
	exec makenamelink $(OUTPUT)/rootfs/package/admin socklog socklog-2.1.0 $(OUTPUT)/tmp
	exec cp -f $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/socklog $(OUTPUT)/rootfs/package/admin/socklog-2.1.0/command/socklog
	exec makelinks $(OUTPUT)/rootfs /command /package/admin/socklog/command
	exec setuidgid $(NORMALUSER) s6-touch $@