Compare commits
No commits in common. "0545a207564fc7111e945b5c7802fb4a658f3c42" and "5e06435ce267fc78415e3e131ce79a51ec2368f1" have entirely different histories.
0545a20756
...
5e06435ce2
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
config.mk
|
config.mk
|
||||||
work
|
work
|
||||||
distfiles/*
|
distfiles/*
|
||||||
packages/*.tar.zstd
|
packages/*.tgz
|
||||||
tags
|
packages/*.tbz
|
||||||
|
packages/*.txz
|
||||||
|
14
mk/ports.mk
14
mk/ports.mk
@ -1,4 +1,4 @@
|
|||||||
# ports.mk - hhl - /usr/ports/mk
|
# ports.mk - hhl - /usr/include/mk
|
||||||
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -8,9 +8,9 @@ DESTDIR = $(workdir)/staged
|
|||||||
basedir = $(portdir)/../..
|
basedir = $(portdir)/../..
|
||||||
include $(basedir)/config.mk
|
include $(basedir)/config.mk
|
||||||
|
|
||||||
prefix ?= /usr
|
prefix ?= /usr/pkg
|
||||||
confdir ?= /etc
|
confdir ?= $(prefix)/etc
|
||||||
localstatedir ?= /var
|
localstatedir ?= $(prefix)/var
|
||||||
logdir ?= $(localstatedir)/log
|
logdir ?= $(localstatedir)/log
|
||||||
default_goal ?= all
|
default_goal ?= all
|
||||||
install_cmd ?= $(MAKE) $(makeflags) DESTDIR=$(DESTDIR) -C $(objdir) install
|
install_cmd ?= $(MAKE) $(makeflags) DESTDIR=$(DESTDIR) -C $(objdir) install
|
||||||
@ -42,11 +42,11 @@ man8dir = $(mandir)/man8
|
|||||||
|
|
||||||
distname ?= $(pkg_name)
|
distname ?= $(pkg_name)
|
||||||
pkg_rev ?= 1
|
pkg_rev ?= 1
|
||||||
pkg_ext ?= tar.zstd
|
pkg_ext ?= tgz
|
||||||
pkgfullname ?= $(pkg_name)-$(pkg_version)_$(pkg_rev)
|
pkgfullname ?= $(pkg_name)-$(pkg_version)_hhl$(pkg_rev)
|
||||||
pkgfile ?= $(pkgfullname).$(pkg_ext)
|
pkgfile ?= $(pkgfullname).$(pkg_ext)
|
||||||
pkglocal ?= $(pkgdir)/$(pkgfile)
|
pkglocal ?= $(pkgdir)/$(pkgfile)
|
||||||
pkgdeps = $(workdir)/.stripped package.specs
|
pkgdeps = $(workdir)/.stripped $(workdir)/PLIST $(workdir)/BUILD_INFO
|
||||||
distdir = $(basedir)/distfiles
|
distdir = $(basedir)/distfiles
|
||||||
distfullname ?= $(distname)-$(pkg_version)
|
distfullname ?= $(distname)-$(pkg_version)
|
||||||
distext ?= xz
|
distext ?= xz
|
||||||
|
@ -32,13 +32,22 @@ install: $(workdir)/.installed
|
|||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|
||||||
package: $(pkglocal)
|
package: $(pkglocal)
|
||||||
$(info $(grn)=== $(pkgfullname) created ===$(reset))
|
|
||||||
|
|
||||||
.PHONY: package
|
.PHONY: package
|
||||||
|
$(info $(grn)=== $(pkgfullname) created ===$(reset))
|
||||||
|
|
||||||
$(pkglocal): $(pkgdeps) | $(pkgdir)
|
$(pkglocal): $(pkgdeps) | $(pkgdir)
|
||||||
$(info $(grn)=== creating package $(pkgfullname) ===$(reset))
|
$(info $(grn)=== creating package $(pkgfullname) ===$(reset))
|
||||||
hpk create -o $(pkgdir) -s package.specs $(DESTDIR)
|
pkg_create \
|
||||||
|
-c -"$(comment)" \
|
||||||
|
-B $(workdir)/BUILD_INFO \
|
||||||
|
-d $(portdir)/DESCR \
|
||||||
|
-f $(workdir)/PLIST \
|
||||||
|
-I / \
|
||||||
|
-p $(DESTDIR) \
|
||||||
|
-g root \
|
||||||
|
-u root \
|
||||||
|
$@
|
||||||
|
|
||||||
$(workdir)/.installed: $(pkglocal)
|
$(workdir)/.installed: $(pkglocal)
|
||||||
$(info $(grn)=== Installing $(distlocal) ===$(reset))
|
$(info $(grn)=== Installing $(distlocal) ===$(reset))
|
||||||
@ -60,6 +69,47 @@ $(workdir)/.staged: $(workdir)/.built
|
|||||||
$(post_install)
|
$(post_install)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
$(workdir)/PLIST: $(workdir)/.staged
|
||||||
|
cd $(DESTDIR) && \
|
||||||
|
find usr -type f -o -type l | sort -u > $@
|
||||||
|
|
||||||
|
$(workdir)/BUILD_INFO: $(workdir)/.staged
|
||||||
|
@echo ABI=$(ABI) > work/build_info
|
||||||
|
@echo BUILD_DATE=$$(date -u "+%y-%m-%d %H:%M:%S") +0000 >> work/build_info
|
||||||
|
@echo BUILD_HOST=$$(uname -a) >> work/build_info
|
||||||
|
@echo CATEGORIES=$$(basename $$(dirname $(portdir))) >> work/build_info
|
||||||
|
@echo CC_VERSION=gcc-$$(gcc --version | head -n 1 | awk '{print $$3}') \
|
||||||
|
>> work/build_info
|
||||||
|
@echo CFLAGS=$(CFLAGS) >> work/build_info
|
||||||
|
@echo GLIBC_VERSION=$$(/lib/libc.so.6 | head -n 1 | awk '{print $9}' | \
|
||||||
|
cut -b 1-4) >> work/build_info
|
||||||
|
@echo HOMEPAGE=$(pkg_homepage) >> work/build_info
|
||||||
|
@echo LDFLAGS=$(LDFLAGS) >> work/build_info
|
||||||
|
@echo LICENSE=$(pkg_license) >> work/build_info
|
||||||
|
@echo LOCALBASE=/usr/pkg >> work/build_info
|
||||||
|
@echo MACHINE_ARCH=$$(uname -m) >> work/build_info
|
||||||
|
@echo MAINTAINER=$(pkg_maintainer) >> work/build_info
|
||||||
|
@echo OBJECT_FMT=ELF >> work/build_info
|
||||||
|
@echo OPSYS=Linux >> work/build_info
|
||||||
|
@echo OS_VERSION=$$(uname -r) >> work/build_info
|
||||||
|
@echo PKGGNUDIR=gnu >> work/build_info
|
||||||
|
@echo PKGINFODIR=info >> work/build_info
|
||||||
|
@echo PKGMANDIR=man >> work/build_info
|
||||||
|
@echo PKGPATH=$$(basename $$(dirname $(portdir)))/$$(basename $(portdir)) \
|
||||||
|
>> work/build_info
|
||||||
|
@echo PKGSYSCONFBASEDIR=/usr/pkg/etc >> work/build_info
|
||||||
|
@echo PKGSYSCONFDIR=/usr/pkg/etc >> work/build_info
|
||||||
|
@echo PKGTOOLS_VERSION=$$(pkg_add -V) >> work/build_info
|
||||||
|
@find $(DESTDIR) -type f | while read f ; \
|
||||||
|
do if [ "$$(file $$f | grep ELF)" != "" ] ; \
|
||||||
|
then ldd $$f ; fi ; \
|
||||||
|
done | awk '{ print $$3 }' | grep -v linux-vdso | sort -u | \
|
||||||
|
while read f ; \
|
||||||
|
do echo REQUIRES=$$f >> work/build_info ; done
|
||||||
|
@for provides in $(pkg_provides) ; \
|
||||||
|
do echo PROVIDES=$${provides} >> work/build_info ; done
|
||||||
|
@mv work/build_info $@
|
||||||
|
|
||||||
$(installdirs):
|
$(installdirs):
|
||||||
install -d $@
|
install -d $@
|
||||||
|
|
||||||
|
@ -10,5 +10,26 @@ pkg_maintainer = jeang3nie@hitchhiker-linux.org
|
|||||||
distremote =
|
distremote =
|
||||||
sha512_sum = e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
|
sha512_sum = e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
|
||||||
include ../../mk/ports.mk
|
include ../../mk/ports.mk
|
||||||
|
include config.mk
|
||||||
|
include provides.mk
|
||||||
|
|
||||||
|
ifeq ($(enable_fortran), 1)
|
||||||
|
fortran = ,fortran
|
||||||
|
endif
|
||||||
|
ifeq ($(enable_go), 1)
|
||||||
|
golang = ,go
|
||||||
|
endif
|
||||||
|
ifeq ($(enable_objc), 1)
|
||||||
|
objc = ,objc
|
||||||
|
endif
|
||||||
|
ifeq ($(enable_objcxx), 1)
|
||||||
|
objcxx = ,obj-c++
|
||||||
|
endif
|
||||||
|
|
||||||
|
config_opts += --enable-languages=c,c++,lto$(fortran)$(golang)$(objc)$(objcxx)
|
||||||
|
config_opts += --disable-multilib
|
||||||
|
config_opts += --disable-bootstrap
|
||||||
|
config_opts += --with-system-zlib
|
||||||
|
|
||||||
include ../../mk/targets.mk
|
include ../../mk/targets.mk
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user