.PHONY: all .DEFAULT_GOAL: all all: create build VERSION=6.2 PKG_NAME=dwm PKG_FOLDER=${PKG_NAME}-package PKG_URL=https://git.vasthecat.ru/${PKG_NAME}.git SRC=${PKG_NAME}-src ${SRC}: git clone "${PKG_URL}" "${SRC}" ${PKG_FOLDER}: mkdir -p "${PKG_FOLDER}/usr/bin" mkdir -p "${PKG_FOLDER}/usr/share/man/man1" mkdir -p "${PKG_FOLDER}/usr/share/pixmaps" mkdir -p "${PKG_FOLDER}/usr/share/applications" cp -r "DEBIAN" "${PKG_FOLDER}" create: ${SRC} ${PKG_FOLDER} cp "${SRC}/${PKG_NAME}.png" "${PKG_FOLDER}/usr/share/pixmaps/" cp "${PKG_NAME}.desktop" "${PKG_FOLDER}/usr/share/applications/" make -C "${SRC}" cp -f "${SRC}/${PKG_NAME}" "${PKG_FOLDER}/usr/bin" chmod 755 "${PKG_FOLDER}/usr/bin/${PKG_NAME}" sed "s/VERSION/${VERSION}/g" < ${SRC}/${PKG_NAME}.1 > ${PKG_FOLDER}/usr/share/man/man1/${PKG_NAME}.1 chmod 644 ${PKG_FOLDER}/usr/share/man/man1/${PKG_NAME}.1 build: fakeroot dpkg-deb --build "${PKG_FOLDER}" clean: rm -rf dwm-*