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

Support build with Go modules #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
GOPATH := ${PWD}
SOURCES := $(wildcard src/*.go src/launch/*.go)
PREFIX ?= /usr/local

all: sbin/launch_socket_server

sbin/launch_socket_server: $(SOURCES)
GOPATH=${GOPATH} go build -o sbin/launch_socket_server src/launch_socket_server.go
cd src && go build -o ../sbin/launch_socket_server

install: sbin/launch_socket_server
mkdir -p ${PREFIX}/sbin ${PREFIX}/libexec/launch_socket_server
cp -p sbin/launch_socket_server ${PREFIX}/sbin
cp -p libexec/launch_socket_server/login_wrapper ${PREFIX}/libexec/launch_socket_server

clean:
GOPATH=${GOPATH} go clean
cd src && go clean
rm -f sbin/launch_socket_server
3 changes: 3 additions & 0 deletions src/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/mistydemeo/launch_socket_server

go 1.18
3 changes: 2 additions & 1 deletion src/launch_socket_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package main
import (
"fmt"
"io"
"launch"
"net"
"os"
"os/exec"
"path/filepath"
"strconv"

"github.com/mistydemeo/launch_socket_server/launch"
)

var programName string
Expand Down