-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
693 additions
and
2,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# | ||
|
||
# | ||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
# | ||
|
||
include Makefile.com | ||
|
||
BINS = \ | ||
pkg \ | ||
pkgdepend \ | ||
pkgrepo \ | ||
pkgdiff \ | ||
pkgfmt \ | ||
pkglint \ | ||
pkgmerge \ | ||
pkgmogrify \ | ||
pkgsurf \ | ||
pkgsend \ | ||
pkgrecv \ | ||
pkgsign | ||
|
||
LIBS = \ | ||
pkg.depotd | ||
|
||
TARGETS= $(BINS:%=$(ROOTUSRBIN)/%) $(LIBS:%=$(ROOTUSRLIB)/%) | ||
|
||
$(ROOTUSRBIN)/pkg := SRC = client.py | ||
$(ROOTUSRBIN)/pkgdepend := SRC = pkgdep.py | ||
$(ROOTUSRBIN)/pkgrepo := SRC = pkgrepo.py | ||
$(ROOTUSRBIN)/pkgdiff := SRC = util/publish/pkgdiff.py | ||
$(ROOTUSRBIN)/pkgfmt := SRC = util/publish/pkgfmt.py | ||
$(ROOTUSRBIN)/pkglint := SRC = util/publish/pkglint.py | ||
$(ROOTUSRBIN)/pkgmerge := SRC = util/publish/pkgmerge.py | ||
$(ROOTUSRBIN)/pkgmogrify := SRC = util/publish/pkgmogrify.py | ||
$(ROOTUSRBIN)/pkgsurf := SRC = util/publish/pkgsurf.py | ||
$(ROOTUSRBIN)/pkgsend := SRC = publish.py | ||
$(ROOTUSRBIN)/pkgrecv := SRC = pull.py | ||
$(ROOTUSRBIN)/pkgsign := SRC = sign.py | ||
$(ROOTUSRLIB)/pkg.depotd := SRC = depot.py | ||
|
||
all clean clobber: | ||
|
||
install: $(TARGETS) | ||
python$(PYVER) $(PYCOMPILE_OPTS) $(TARGETS) | ||
|
||
$(TARGETS): FRC | ||
$(MKDIR) $(@D) | ||
$(RM) $@ | ||
$(SED) '1s/python3 /python$(PYVER) /' < $(SRC) > $@ | ||
$(CHMOD) 555 $@ | ||
|
||
# shebang... | ||
|
||
FRC: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# | ||
|
||
# | ||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
# | ||
|
||
# | ||
# This file is used instead of Makefile.ext when cross-compiling as the FFI | ||
# module is not available in the python cross environment. | ||
# | ||
|
||
include ../../../Makefile.com | ||
|
||
SUSEPY.cmd = echo $(USEPY) | tr -d . | ||
SUSEPY = $(SUSEPY.cmd:sh) | ||
|
||
ROOTPYPKG= $(ROOT)/usr/lib/python$(USEPY)/vendor-packages/pkg | ||
|
||
EXTENSIONS= arch sha512_t sysattr syscallat | ||
SOBJ= $(EXTENSIONS:%=_%.cpython-$(SUSEPY)-$(TRIPLET).so) | ||
|
||
_sha512_t.cpython-%.so := LDFLAGS = -lmd | ||
_sysattr.cpython-%.so := LDFLAGS = -lnvpair | ||
|
||
all: $(SOBJ) | ||
|
||
install: all $(ROOTPYPKG) $(SOBJ:%=$(ROOTPYPKG)/%) | ||
|
||
clean: | ||
clobber: | ||
$(RM) $(SOBJ) | ||
|
||
$(ROOTPYPKG): FRC | ||
$(MKDIR) $@ | ||
|
||
$(ROOTPYPKG)/%.so: %.so | ||
$(MKDIR) $(@D) | ||
$(RM) $@; $(INSTALL) -f $(@D) -m 0555 $< | ||
|
||
%.cpython-$(SUSEPY)-$(TRIPLET).so: %.c | ||
$(CC) -shared -fPIC $< $(PYCFLAGS) $(PYLDFLAGS) $(LDFLAGS) -o $@ | ||
|
||
FRC: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# | ||
|
||
# | ||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
# | ||
|
||
include ../../../Makefile.com | ||
|
||
SUSEPY.cmd = echo $(USEPY) | tr -d . | ||
SUSEPY = $(SUSEPY.cmd:sh) | ||
|
||
ROOTPYPKG= $(ROOT)/usr/lib/python$(USEPY)/vendor-packages/pkg | ||
|
||
EXTENSIONS= arch sha512_t sysattr syscallat | ||
SOURCES= $(EXTENSIONS:%=_%.c) | ||
SOBJ= $(EXTENSIONS:%=_%.cpython-$(SUSEPY)-$(TRIPLET).so) | ||
ROOTSOBJ = $(SOBJ:%=$(ROOTPYPKG)/%) | ||
|
||
all: $(SOURCES) | ||
|
||
install: $(ROOTPYPKG) $(ROOTSOBJ) | ||
|
||
clean: | ||
$(RM) $(SOURCES) $(SOURCES:%.c=%.o) | ||
|
||
clobber: clean | ||
$(RM) *.so | ||
|
||
$(ROOTSOBJ): $(SOURCES) | ||
|
||
$(ROOTPYPKG): FRC | ||
$(MKDIR) $@ | ||
|
||
$(ROOTPYPKG)/%: % | ||
$(RM) $@; $(INSTALL) -f $(@D) -m 0555 $< | ||
|
||
_%.c: ../../build_%.py | ||
python$(USEPY) $< | ||
|
||
FRC: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.