Compare commits

..

3 Commits

Author SHA1 Message Date
Nathan Fisher
0545a20756 Merge /mnt/usr/ports into odin 2023-03-30 19:04:11 -04:00
Nathan Fisher
b24de13af5 Some preparation to work with hpk instead of NetBSD pkgtools 2023-03-30 19:03:36 -04:00
Ford Prefect
2c5a2b0c05 Fix comments in ports.mk; Add x11/briskmenu 2023-03-30 18:50:25 -04:00
4 changed files with 11 additions and 83 deletions

5
.gitignore vendored
View File

@ -1,6 +1,5 @@
config.mk
work
distfiles/*
packages/*.tgz
packages/*.tbz
packages/*.txz
packages/*.tar.zstd
tags

View File

@ -1,4 +1,4 @@
# ports.mk - hhl - /usr/include/mk
# ports.mk - hhl - /usr/ports/mk
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
@ -8,9 +8,9 @@ DESTDIR = $(workdir)/staged
basedir = $(portdir)/../..
include $(basedir)/config.mk
prefix ?= /usr/pkg
confdir ?= $(prefix)/etc
localstatedir ?= $(prefix)/var
prefix ?= /usr
confdir ?= /etc
localstatedir ?= /var
logdir ?= $(localstatedir)/log
default_goal ?= all
install_cmd ?= $(MAKE) $(makeflags) DESTDIR=$(DESTDIR) -C $(objdir) install
@ -42,11 +42,11 @@ man8dir = $(mandir)/man8
distname ?= $(pkg_name)
pkg_rev ?= 1
pkg_ext ?= tgz
pkgfullname ?= $(pkg_name)-$(pkg_version)_hhl$(pkg_rev)
pkg_ext ?= tar.zstd
pkgfullname ?= $(pkg_name)-$(pkg_version)_$(pkg_rev)
pkgfile ?= $(pkgfullname).$(pkg_ext)
pkglocal ?= $(pkgdir)/$(pkgfile)
pkgdeps = $(workdir)/.stripped $(workdir)/PLIST $(workdir)/BUILD_INFO
pkgdeps = $(workdir)/.stripped package.specs
distdir = $(basedir)/distfiles
distfullname ?= $(distname)-$(pkg_version)
distext ?= xz

View File

@ -32,22 +32,13 @@ install: $(workdir)/.installed
.PHONY: install
package: $(pkglocal)
$(info $(grn)=== $(pkgfullname) created ===$(reset))
.PHONY: package
$(info $(grn)=== $(pkgfullname) created ===$(reset))
$(pkglocal): $(pkgdeps) | $(pkgdir)
$(info $(grn)=== creating package $(pkgfullname) ===$(reset))
pkg_create \
-c -"$(comment)" \
-B $(workdir)/BUILD_INFO \
-d $(portdir)/DESCR \
-f $(workdir)/PLIST \
-I / \
-p $(DESTDIR) \
-g root \
-u root \
$@
hpk create -o $(pkgdir) -s package.specs $(DESTDIR)
$(workdir)/.installed: $(pkglocal)
$(info $(grn)=== Installing $(distlocal) ===$(reset))
@ -69,47 +60,6 @@ $(workdir)/.staged: $(workdir)/.built
$(post_install)
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):
install -d $@

View File

@ -10,26 +10,5 @@ pkg_maintainer = jeang3nie@hitchhiker-linux.org
distremote =
sha512_sum = e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
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