Skip to content

Commit 677eda1

Browse files
committed
Upload New Files
1 parent 48476ff commit 677eda1

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Fri Jan 30 21:19:00 -03 2026:
2+
- fix copy apkbuild folder to build folder
23
- fallback if --apkbuild is dir
34
- fix no_group option
45
- add default install: glib-dev glib-static libtool

src/builder.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,23 @@ impl Builder {
153153
}
154154
}
155155

156-
let dest_dir = format!("{}/build/{}", rootfs_dir, dir_name);
156+
let folder_name = Path::new(&dir_name)
157+
.file_name()
158+
.and_then(|n| n.to_str())
159+
.unwrap_or(&dir_name);
160+
161+
let dest_dir = format!("{}/build/", rootfs_dir);
157162
let build_dir = Path::new(&dest_dir);
158163
fs::create_dir_all(build_dir)?;
159164

160165
if copy_only_apkbuild {
161166
let dest_file = build_dir.join("APKBUILD");
162167
fs::copy(pkg_name.clone(), &dest_file)?;
163168
} else {
164-
let dest_path = build_dir.parent();
165-
utils::copy_dir_recursive(dir_name.as_ref(), dest_path.unwrap())?;
169+
utils::copy_dir_recursive(dir_name.as_ref(), build_dir)?;
166170
}
167171

168-
Self::run_abuild(rootfs_dir.clone(), dir_name)?;
172+
Self::run_abuild(rootfs_dir.clone(), folder_name.to_string())?;
169173
}
170174

171175
Ok(())
@@ -235,7 +239,7 @@ impl Builder {
235239
cd /build/{dir_name}
236240
abuild -r -F
237241
find \"/build/packages/build/{u}\" -name \"$apkbuild_name\"*.apk -exec apk add --allow-untrusted {{}} \\;
238-
", u = utils::get_arch());
242+
", u = utils::get_arch()); // todo: package name for install apk
239243

240244
Command::run(rootfs, None, Some(cmd), true, true, true)?;
241245

0 commit comments

Comments
 (0)