Permalink
Browse files

start trying to make rustpkg work

  • Loading branch information...
1 parent fabcb79 commit d7894dd67dee467741a937286dca381821a9abad @doy committed Apr 2, 2013
Showing with 21 additions and 1 deletion.
  1. +2 −0 Makefile
  2. +15 −0 pkg.rs
  3. +4 −1 src/term.rs
View
@@ -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 $@ $<
View
15 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 () { }
View
@@ -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"];

0 comments on commit d7894dd

Please sign in to comment.