-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up and implement a proper installer
- Loading branch information
Showing
4 changed files
with
58 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
PREFIX?= /usr/local | ||
LIBDIR?= lib | ||
PROGNAME?= tcldnssrv | ||
|
||
TARGET?= $(PREFIX)/$(LIBDIR)/$(PROGNAME) | ||
|
||
TCLSH?= tclsh | ||
|
||
UID?= root | ||
GID?= wheel | ||
|
||
all: | ||
|
||
pkgindex: | ||
@echo "Generating pkgIndex" | ||
cd $(TARGET) ; umask 022 ; echo "pkg_mkIndex -direct . *.tcl" | $(TCLSH) | ||
|
||
install-lib: | ||
@echo "Installing $(PROGNAME) to $(TARGET)" | ||
install -o $(UID) -g $(GID) -m 0755 -d $(TARGET) | ||
install -o $(UID) -g $(GID) -m 0644 dnssrv.tcl $(TARGET) | ||
|
||
install-package: install-lib pkgindex | ||
|
||
install: install-package | ||
|
||
uninstall: | ||
@echo "Uninstalling $(PROGNAME)" | ||
rm -rf $(TARGET) |
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,23 @@ | ||
#!/usr/bin/env tclsh | ||
|
||
if {[catch {source dnssrv.tcl} err]} { | ||
package require dnssrv | ||
} | ||
|
||
proc main {} { | ||
lappend hostlist _sweighted._tcp.prod.macnugget.org | ||
lappend hostlist _weighted._tcp.prod.macnugget.org | ||
lappend hostlist _testservice._tcp.prod.macnugget.org | ||
|
||
foreach fqdn $hostlist { | ||
puts "# Probing ${fqdn}\n" | ||
puts " \[::dnssrv::hostlist $fqdn\]" | ||
puts " [::dnssrv::hostlist $fqdn]" | ||
puts "" | ||
puts " \[::dnssrv::tophost $fqdn\]" | ||
puts " [::dnssrv::tophost $fqdn]" | ||
puts "\n-- \n" | ||
} | ||
} | ||
|
||
if !$tcl_interactive main |