.gitignore | 2 ++ BSDmakefile | 3 --- GNUmakefile | 20 -------------------- INSTALL | 10 +++++++--- VERSION.do | 2 ++ all.do | 1 + common.mk | 4 ---- daemon.go | 4 ++-- goircd.do | 2 ++ goircd.go | 5 +++-- diff --git a/.gitignore b/.gitignore index 1e8cd4f2752e427d9718566422e4053f9220386f573b5212a7d4c3796a46187d..078442618bb23b3a0ed3ba2f83fc6138ce33818ad11c7b7499ff0ecbcfea729c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.deb *_tmp +goircd +VERSION diff --git a/BSDmakefile b/BSDmakefile deleted file mode 100644 index 0d1a3b1ab6a017214831f0d9bb34cb58d3ce327e89cef0f13a07edf62f3effcd..0000000000000000000000000000000000000000 --- a/BSDmakefile +++ /dev/null @@ -1,3 +0,0 @@ -VERSION != git describe --tags - -include common.mk diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 27926fd581fcc00f5daeebfdd6a5d993550d9e2ffa97caa6acd2ddcc31443851..0000000000000000000000000000000000000000 --- a/GNUmakefile +++ /dev/null @@ -1,20 +0,0 @@ -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} diff --git a/INSTALL b/INSTALL index c25ad2518eaa72d31cc54b5f4a49b0058282702e66c5e2447b463f7180e075b7..95e871f8e3283933c640f55d6e9c8ab100243844160e6cac0675685a88ce0ce5 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,10 @@ 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 diff --git a/VERSION.do b/VERSION.do new file mode 100644 index 0000000000000000000000000000000000000000..871d4c3481e3e97f244477df90000204c99821947c83f05487cec423b7154f78 --- /dev/null +++ b/VERSION.do @@ -0,0 +1,2 @@ +redo-ifchange goircd.go +perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < goircd.go diff --git a/all.do b/all.do new file mode 100644 index 0000000000000000000000000000000000000000..fa10cecf15a6123d08d839ced8ad1aea708ad9cce324f71c04d633d2c339ae6a --- /dev/null +++ b/all.do @@ -0,0 +1 @@ +redo-ifchange goircd diff --git a/common.mk b/common.mk deleted file mode 100644 index 202985b31c267413c6585608765109a4c83e52adcc049b30272cc7cadf47fd9d..0000000000000000000000000000000000000000 --- a/common.mk +++ /dev/null @@ -1,4 +0,0 @@ -LDFLAGS = -X main.version=$(VERSION) - -goircd: *.go - go build -ldflags "$(LDFLAGS)" diff --git a/daemon.go b/daemon.go index 5c34841302221bde67992418208f67b505ccd75dbaa0c0dba62f64a8cca3d93c..c9a0ff15642be48dc458dd03d56efd5624d57628373e0e3f61e661b6381f56e7 100644 --- a/daemon.go +++ b/daemon.go @@ -230,7 +230,7 @@ } } 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) @@ -562,7 +562,7 @@ debug = "debug" } 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") } diff --git a/goircd.do b/goircd.do new file mode 100644 index 0000000000000000000000000000000000000000..c6fe336164ab569a38d3598786e371e0cf6c53402d45dd15e4e4dd99dabfcb4f --- /dev/null +++ b/goircd.do @@ -0,0 +1,2 @@ +redo-ifchange *.go +${GO:-go} build -o $3 diff --git a/goircd.go b/goircd.go index 4b58cbd20656772271c0a353b46775ebf57777424ad040f70e2977a5ffba709c..7a4edbbd3fce9b1c93e9a5b5bdda0a599b1b71945c704431875dac5f923cdbb3 100644 --- a/goircd.go +++ b/goircd.go @@ -28,8 +28,9 @@ "path/filepath" "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") @@ -71,7 +72,7 @@ go Logger(*logdir, logSink) log.Println(*logdir, "logger initialized") } - log.Println("goircd " + version + " is starting") + log.Println("goircd " + Version + " is starting") if *statedir == "" { // Dummy statekeeper go func() {