Permalink
Browse files

Register wrapper installation step

Register steps for installation and uninstallation of wrapper library.
This needs to be improved with pkg-config etc.
  • Loading branch information...
1 parent f7ca9ac commit f9d851dd4117802b01b073e292f7725f381c9385 @sa1 sa1 committed Sep 8, 2013
Showing with 31 additions and 0 deletions.
  1. +31 −0 setup.winxed
View
@@ -37,6 +37,8 @@ function main[main](argv) {
register_step_before("build", build_nci);
register_step_before("build", build_lib);
register_step_before("clean", clean_build_dir);
+ register_step_before("install", install_clib);
+ register_step_before("uninstall", uninstall_clib);
argv.shift();
setup(argv, parrot_libgit2);
@@ -93,6 +95,35 @@ function build_test() {
${ spawnw result, cmd};
}
+function install_clib(){
+ //TODO use pkg-config
+ var env = new 'Env';
+ string parrotgitdir;
+ if (env['LIBPARROTGIT_INSTALL_DIR'] == ''){
+ parrotgitdir = "/usr/local/lib/";
+ }
+ else{
+ parrotgitdir = env['LIBPARROTGIT_INSTALL_DIR'];
+ }
+ string cmd = "cp libparrotgit.so " + parrotgitdir;
+ int result;
+ ${spawnw result, cmd};
+}
+
+function uninstall_clib(){
+ var env = new 'Env';
+ string parrotgitdir;
+ if (env['LIBPARROTGIT_INSTALL_DIR'] == ''){
+ parrotgitdir = "/usr/local/lib/";
+ }
+ else{
+ parrotgitdir = env['LIBPARROTGIT_INSTALL_DIR'];
+ }
+ string filename = parrotgitdir + "libparrotgit.so";
+ int result;
+ unlink(filename);
+}
+
function build_nci() {
var env = new 'Env';
string libgit_dir;

0 comments on commit f9d851d

Please sign in to comment.