aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-04-01 22:07:42 -0500
committerJesse Luehrs <doy@tozt.net>2013-04-01 22:07:42 -0500
commitd7894dd67dee467741a937286dca381821a9abad (patch)
tree6f9c0baf493d7c9b64a2e2c45707439db7f03051
parentfabcb790ede272334789673774d945b4785909a7 (diff)
downloadrust-term-d7894dd67dee467741a937286dca381821a9abad.tar.gz
rust-term-d7894dd67dee467741a937286dca381821a9abad.zip
start trying to make rustpkg work
-rw-r--r--Makefile2
-rw-r--r--pkg.rs15
-rw-r--r--src/term.rs5
3 files changed, 21 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8e18cbd..9136f47 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ tmp/built: $(MAIN_SOURCE) $(OTHER_SOURCES) tmp/libtermios_wrapper.a tmp/libcurse
@mkdir -p lib
$(RUSTC) --out-dir lib -L tmp $(MAIN_SOURCE) && touch tmp/built
+clibs: tmp/libtermios_wrapper.a tmp/libcurses_helper.a tmp/libio_helper.a
+
tmp/libtermios_wrapper.a: tmp/termios_wrapper.o
ar cr $@ $<
diff --git a/pkg.rs b/pkg.rs
new file mode 100644
index 0000000..9e9edeb
--- /dev/null
+++ b/pkg.rs
@@ -0,0 +1,15 @@
+#[pkg(id = "net.tozt.rust-term", vers = "0.0.1")];
+
+extern mod rustpkg;
+use core::run::run_program;
+
+// XXX this doesn't work at all, need to figure out what i'm doing wrong
+#[pkg_do(build)]
+fn build () {
+ let exit = run_program("make", [~"clibs"]);
+ assert!(exit == 0);
+ let crate = rustpkg::Crate(~"src/term.rs").flag(~"-Ltmp");
+ rustpkg::build(~[crate]);
+}
+
+fn main () { }
diff --git a/src/term.rs b/src/term.rs
index 06472d4..d7e8fb2 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -1,4 +1,7 @@
-#[link(name = "term", vers = "0.0.1", author = "doy")];
+#[link(name = "term",
+ vers = "0.0.1",
+ uuid = "55ed8b92-1054-4286-95b2-8e967f4fd51b",
+ url = "https://github.com/doy/rust-term")];
#[crate_type = "lib"];