*.deb
*_tmp
+goircd
+VERSION
+++ /dev/null
-VERSION != git describe --tags
-
-include common.mk
+++ /dev/null
-VERSION = $(shell git describe --tags)
-BUILD_TMP ?= .rpm_tmp
-DEB_MAINTAINER ?= mengzhuo1203@gmail.com
-
-include common.mk
-
-.PHONY: deb
-deb:
- rm -rf ${BUILD_TMP}
- mkdir -p ${BUILD_TMP}/usr/local/bin/
- mkdir -p ${BUILD_TMP}/var/log/goircd
- mkdir -p ${BUILD_TMP}/etc/systemd/system/
- cp goircd ${BUILD_TMP}/usr/local/bin/
- cp startup/goircd.service ${BUILD_TMP}/etc/systemd/system/
- fpm -s dir -t deb -n goircd -v ${VERSION} \
- -m $(DEB_MAINTAINER) \
- --deb-compression=bzip2 \
- --verbose \
- -d logrotate \
- -C ${BUILD_TMP}
goircd requires only standard Go's libraries and consists of single main
-package. You can install it like that:
+package. You can install it like either:
+
+* with: go get go.cypherpunks.ru/goircd
+* or manually:
$ git clone git://git.cypherpunks.ru/goircd.git
- $ make -C goircd
- $ goircd/goircd -help
+ $ cd goircd
+ $ redo goircd # or just: go build
+ $ ./goircd -help
--- /dev/null
+redo-ifchange goircd.go
+perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < goircd.go
--- /dev/null
+redo-ifchange goircd
+++ /dev/null
-LDFLAGS = -X main.version=$(VERSION)
-
-goircd: *.go
- go build -ldflags "$(LDFLAGS)"
}
client.registered = true
client.ReplyNicknamed("001", "Hi, welcome to IRC")
- client.ReplyNicknamed("002", "Your host is "+*hostname+", running goircd "+version)
+ client.ReplyNicknamed("002", "Your host is "+*hostname+", running goircd "+Version)
client.ReplyNicknamed("003", "This server was created sometime")
client.ReplyNicknamed("004", *hostname+" goircd o o")
SendLusers(client)
} else {
debug = ""
}
- client.ReplyNicknamed("351", fmt.Sprintf("%s.%s %s :", version, debug, *hostname))
+ client.ReplyNicknamed("351", fmt.Sprintf("%s.%s %s :", Version, debug, *hostname))
default:
client.ReplyNicknamed("421", cmd, "Unknown command")
}
--- /dev/null
+redo-ifchange *.go
+${GO:-go} build -o $3
"strings"
)
+const Version = "1.8.2"
+
var (
- version string
hostname = flag.String("hostname", "localhost", "Hostname")
bind = flag.String("bind", ":6667", "Address to bind to")
motd = flag.String("motd", "", "Path to MOTD file")
log.Println(*logdir, "logger initialized")
}
- log.Println("goircd " + version + " is starting")
+ log.Println("goircd " + Version + " is starting")
if *statedir == "" {
// Dummy statekeeper
go func() {