diff --git a/lib/clickfunc b/lib/clickfunc index db1728b..9f4aa24 100644 --- a/lib/clickfunc +++ b/lib/clickfunc @@ -41,7 +41,7 @@ function build_click () { function prep_build () { [ -d "${INSTALL_DIR}" ] && rm -r ${INSTALL_DIR} mkdir -p ${CLICK_LD_LIBRARY_PATH} ${CLICK_PATH} ${INSTALL_DIR} - fetch_desktop ${BUILD_DIR}/usr/share/applications/${PKG}.desktop ${INSTALL_DIR}/${PKG}.desktop; + fetch_desktop ${PKG} ${INSTALL_DIR}; mod_desktop ${INSTALL_DIR}/${PKG}.desktop; cp ${ROOT}/pkg.d/* ${ROOT}/apparmor.json ${ROOT}/manifest.json ${BUILD_DIR}/ || exit 1 sed -i "s/@pkg@/${PKG}/" ${BUILD_DIR}/manifest.json diff --git a/lib/pkgfunc b/lib/pkgfunc index e43f105..72e2f97 100644 --- a/lib/pkgfunc +++ b/lib/pkgfunc @@ -21,7 +21,7 @@ function pkg_install () { source "${PKG_PREFIX}/lib/crackle/${pkgname}"; install_${pkgname}; fi - fetch_desktop ${pkgname} + fetch_desktop ${pkgname} ${PKG_PREFIX}/share/applications link_icons; link_bash-completion; } @@ -103,10 +103,11 @@ function pkgsetup(){ } function fetch_desktop() { + PKG_DESKTOP=$2 while read desktop do desktopname=$(basename $desktop) - ${SCRP_DIR}/desktop_trunc $desktop > ${PKG_PREFIX}/share/applications/crackle.${desktopname} - echo "X-Ubuntu-Touch=true" >> ${PKG_PREFIX}/share/applications/crackle.${desktopname} + ${SCRP_DIR}/desktop_trunc $desktop > ${PKG_DESKTOP}/crackle.${desktopname} + echo "X-Ubuntu-Touch=true" >> ${PKG_DESKTOP}/crackle.${desktopname} done < <(find $PKG_PATH/$1 -name *.desktop) }