[fix/add] improve the dist task and create the archy-dwm.desktop task
This commit is contained in:
parent
8f4a20dd4e
commit
fa1aa3e444
1 changed files with 19 additions and 14 deletions
33
Makefile
33
Makefile
|
@ -31,13 +31,15 @@ ${BUILD_DIR}: ${OBJ}
|
||||||
clean:
|
clean:
|
||||||
rm -rf ${OBJ_DIR}
|
rm -rf ${OBJ_DIR}
|
||||||
|
|
||||||
dist: clean
|
dist: build/archy-dwm archy-dwm.desktop
|
||||||
mkdir -p archy-dwm_${VERSION}
|
mkdir -p archy-dwm_${VERSION}
|
||||||
cp -R LICENSE Makefile README config.def.h config.mk \
|
cp -R LICENSE ${BUILD_DIR} ${OBJ_DIR}/archy-dwm.desktop archy-dwm.1 dwm.png archy-dwm_${VERSION}
|
||||||
archy-dwm.1 drw.h util.h ${SRC} dwm.png transient.c archy-dwm_${VERSION}
|
|
||||||
tar -cf archy-dwm_${VERSION}.tar archy-dwm_${VERSION}
|
tar -cf archy-dwm_${VERSION}.tar archy-dwm_${VERSION}
|
||||||
gzip archy-dwm_${VERSION}.tar
|
gzip archy-dwm_${VERSION}.tar
|
||||||
rm -rf archy-dwm_${VERSION}
|
rm -rf archy-dwm_${VERSION}
|
||||||
|
echo "The tarball is ready."
|
||||||
|
printf "Tarball size: %s\n" $$(du -h archy-dwm_${VERSION}.tar.gz | cut -f1)
|
||||||
|
printf "Tarball hash: %s\n" $$(sha256sum archy-dwm_${VERSION}.tar.gz | cut -d' ' -f1)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||||
|
@ -47,19 +49,22 @@ install: all
|
||||||
sed "s/VERSION/${VERSION}/g" < archy-dwm.1 > ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
|
sed "s/VERSION/${VERSION}/g" < archy-dwm.1 > ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
|
||||||
chmod 644 ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
|
chmod 644 ${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
|
||||||
|
|
||||||
desktop:
|
archy-dwm.desktop:
|
||||||
full_path=/usr/share/xsessions/archy-dwm.desktop
|
mkdir -p "$(OBJ_DIR)"
|
||||||
mkdir -p /usr/share/xsessions
|
echo "[Desktop Entry]" > "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
cat <<EOT >> ${full_path}
|
echo "Type=XSession" >> "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
[Desktop Entry]
|
echo "Exec=$(DESTDIR)$(PREFIX)/bin/archy-dwm" >> "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
Type=XSession
|
echo "DesktopNames=archy-dwm" >> "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
Exec=/usr/local/bin/archy-dwm
|
echo "Name=archy-dwm" >> "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
DesktopNames=archy-dwm
|
echo "Comment=\"A dynamic window manager for X\"" >> "$(OBJ_DIR)/archy-dwm.desktop"
|
||||||
Name=archy-dwm
|
|
||||||
Comment="A dynamic window manager for X"
|
desktop: archy-dwm.desktop
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/share/xsessions
|
||||||
|
cp "$(OBJ_DIR)/archy-dwm.desktop" ${DESTDIR}${PREFIX}/share/xsessions/archy-dwm.desktop
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f ${DESTDIR}${PREFIX}/bin/archy-dwm \
|
rm -f ${DESTDIR}${PREFIX}/bin/archy-dwm \
|
||||||
${DESTDIR}${MANPREFIX}/man1/archy-dwm.1
|
${DESTDIR}${MANPREFIX}/man1/archy-dwm.1 \
|
||||||
|
${DESTDIR}${PREFIX}/share/xsessions/archy-dwm.desktop
|
||||||
|
|
||||||
.PHONY: all options clean dist install uninstall
|
.PHONY: all options clean dist install uninstall
|
||||||
|
|
Loading…
Reference in a new issue