Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ply #1331

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add ply #1331

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build_info/ply.control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: ply
Version: @DEB_PLY_V@
Architecture: @DEB_ARCH@
Maintainer: @DEB_MAINTAINER@
Author: Dustin Howett <duhowett@microsoft.com>
Section: Golang
Priority: optional
Homepage: https://www.howett.net/projects/plist/
Description: An Apple Property List transcoder, written in Go.
43 changes: 43 additions & 0 deletions makefiles/ply.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif

SUBPROJECTS += ply
PLY_VERSION := 1.0.1
DEB_PLY_V ?= $(PLY_VERSION)

ply-setup: setup
$(call GITHUB_ARCHIVE,DHowett,go-plist,$(PLY_VERSION),v$(PLY_VERSION),ply)
$(call EXTRACT_TAR,ply-$(PLY_VERSION).tar.gz,go-plist-$(PLY_VERSION),ply)
mkdir -p $(BUILD_STAGE)/ply/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin

ifneq ($(wildcard $(BUILD_WORK)/ply/.build_complete),)
ply:
@echo "Using previously built ply."
else
ply: ply-setup
cd $(BUILD_WORK)/ply && $(DEFAULT_GOLANG_FLAGS) go build \
-trimpath \
-o $(BUILD_WORK)/ply/ply \
$(BUILD_WORK)/ply/cmd/ply
$(INSTALL) -Dm755 $(BUILD_WORK)/ply/ply $(BUILD_STAGE)/ply/$(MEMO_PREFIX)$(MEMO_SUB_PREFIX)/bin/
$(call AFTER_BUILD)
endif

ply-package: ply-stage
# ply.mk Package Structure
rm -rf $(BUILD_DIST)/ply

# ply.mk Prep ply
cp -a $(BUILD_STAGE)/ply $(BUILD_DIST)

# ply.mk Sign
$(call SIGN,ply,general.xml)

# ply.mk Make .debs
$(call PACK,ply,DEB_PLY_V)

# ply.mk Build cleanup
rm -rf $(BUILD_DIST)/ply

.PHONY: ply ply-package