abinfo 'Generating and installing .desktop file...'
# adapted from AUR
mkdir -pv "$PKGDIR"/usr/share/applications
cat << EOF > "$PKGDIR"/usr/share/applications/gzdoom.desktop
[Desktop Entry]
Type=Application
Name=GZDoom
Comment=A DOOM source port with graphic and modding extensions
Comment[zh_CN]=含图形增强和模组扩展性的源码移植版 DOOM
Comment[zh_TW]=含視頻增強和模組擴充性的原始碼移植版 DOOM
Icon=gzdoom
Exec=gzdoom %F
Terminal=false
StartupWMClass=GZDoom
MimeType=application/x-doom-wad;
Categories=Game;ActionGame;
EOF

abinfo 'Installing icon...'
install -Dvm644 "$SRCDIR"/src/posix/zdoom.xpm \
                "$PKGDIR"/usr/share/pixmaps/gzdoom.xpm
