mirror of
https://github.com/archlinux/aur.git
synced 2026-03-06 21:22:42 +01:00
Fix cp command with explicit file list
- Remove unreliable cd command that was failing silently - Use explicit file list instead of wildcards to copy only needed files - Prevents copying from wrong directory (root /) which caused sys/devices errors - More robust and follows PKGBUILD best practices
This commit is contained in:
parent
6e6e7e6329
commit
7a3759f54b
1 changed files with 11 additions and 16 deletions
27
PKGBUILD
27
PKGBUILD
|
|
@ -40,25 +40,20 @@ sha256sums=(
|
|||
)
|
||||
|
||||
package() {
|
||||
# Ensure we're in the correct source directory
|
||||
cd "${srcdir}/${pkgname}-${pkgver}" || {
|
||||
echo "ERROR: Failed to change to source directory: ${srcdir}/${pkgname}-${pkgver}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Verify we're in the right place
|
||||
if [ ! -f "PKGBUILD" ] || [ ! -d "lib" ]; then
|
||||
echo "ERROR: Source directory doesn't contain expected files"
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Contents: $(ls -la)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create installation directory
|
||||
install -dm755 "${pkgdir}/opt/${pkgname}"
|
||||
|
||||
# Copy all source files to /opt/hyprwhspr
|
||||
cp -r . "${pkgdir}/opt/${pkgname}/"
|
||||
# Copy all source files to /opt/hyprwhspr from the correct source directory
|
||||
# Use explicit file list to avoid copying hidden files and ensure we only copy what we need
|
||||
cp -r "${srcdir}/${pkgname}-${pkgver}/bin" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/config" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/lib" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/scripts" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/share" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/requirements.txt" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/README.md" \
|
||||
"${srcdir}/${pkgname}-${pkgver}/LICENSE" \
|
||||
"${pkgdir}/opt/${pkgname}/"
|
||||
|
||||
# Make scripts executable
|
||||
chmod +x "${pkgdir}/opt/${pkgname}/scripts/"*.sh
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue