diff --git a/assets/var/gnu/hplip.md b/assets/var/gnu/hplip.md index 8b9ea72..e94c460 100644 --- a/assets/var/gnu/hplip.md +++ b/assets/var/gnu/hplip.md @@ -1,3 +1,11 @@ hplip = https://sourceforge.net/projects/hplip/files/hplip/3.26.4/hplip-3.26.4.tar.gz + +``` sh *** build *** +./configure --prefix=/pkg/gnu/hplip --disable-network-build +``` + +``` cfg *** build deps *** +libusb +``` diff --git a/assets/var/gnu/libusb.md b/assets/var/gnu/libusb.md new file mode 100644 index 0000000..fb9fe27 --- /dev/null +++ b/assets/var/gnu/libusb.md @@ -0,0 +1,6 @@ +libusb 1.0.3 += +https://github.com/libusb/libusb/releases/download/v1.0.30/libusb-1.0.30.7z + +``` sh *** build *** +``` diff --git a/src/commands/download.rs b/src/commands/download.rs index b10ccf1..1b60ecd 100644 --- a/src/commands/download.rs +++ b/src/commands/download.rs @@ -94,7 +94,7 @@ pub fn download(repo: &String, pkgname: &String, force: bool, recursive: bool) { io::stdout().flush().unwrap(); let mut cmd = Command::new("rsync"); - cmd.arg("-azHX").arg("--stats").arg("--no-times"); + cmd.arg("-azHX").arg("--stats"); if force { cmd.arg("--delete"); } cmd.arg(&remote_path); cmd.arg(&local_path_sync); diff --git a/src/commands/run/download.rs b/src/commands/run/download.rs index b25dd0e..484cd5c 100644 --- a/src/commands/run/download.rs +++ b/src/commands/run/download.rs @@ -43,15 +43,17 @@ pub fn download(repo: &String, pkgname: &String) { } } else if url.is_empty() { return } - else if url.ends_with(".zip") { + else if url.ends_with(".zip") || url.ends_with(".7z") { + let ext = if url.ends_with(".zip") { "zip" } else { "7z" }; + if let Err(e) = fs::create_dir_all(&src) { panic!("Failed to create directory {}: {}", &src.display(), e) } - let zip_path = src.join("archive.zip"); + let archive_path = src.join(format!("archive.{}", ext)); let wget_status = Command::new("wget") .arg("-O") - .arg(&zip_path) + .arg(&archive_path) .arg("-q") .arg("--show-progress") .arg(&url) @@ -65,7 +67,7 @@ pub fn download(repo: &String, pkgname: &String) { let output_flag = format!("-o{}", src.display()); let sevenz_status = Command::new("7z") .arg("x") - .arg(&zip_path) + .arg(&archive_path) .arg(output_flag) .arg("-y") .arg("-bd") @@ -79,7 +81,7 @@ pub fn download(repo: &String, pkgname: &String) { panic!("Failed to extract zip archive from URL: {}", url) } - fs::remove_file(&zip_path).ok(); + fs::remove_file(&archive_path).ok(); } else { if let Err(e) = fs::create_dir_all(&src) {