加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 4.43 KB
一键复制 编辑 原始数据 按行查看 历史
DuanRay 提交于 2023-10-13 21:01 . chore: first commit
PREFIX=/usr/local
#PREFIX=/tmp/smplayer
CONF_PREFIX=$(PREFIX)
DATA_PATH=$(PREFIX)/share/nfs-mplayer
DOC_PATH=$(PREFIX)/share/doc/packages/nfs-mplayer
TRANSLATION_PATH=$(PREFIX)/share/nfs-mplayer/translations
THEMES_PATH=$(PREFIX)/share/nfs-mplayer/themes
SHORTCUTS_PATH=$(PREFIX)/share/nfs-mplayer/shortcuts
ICONS_DIR=$(PREFIX)/share/icons/hicolor/
APPLNK_DIR=$(PREFIX)/share/applications/
QMAKE=qmake
LRELEASE=lrelease
DEFS=DATA_PATH=\\\"$(DATA_PATH)\\\" \
TRANSLATION_PATH=\\\"$(TRANSLATION_PATH)\\\" \
DOC_PATH=\\\"$(DOC_PATH)\\\" THEMES_PATH=\\\"$(THEMES_PATH)\\\" \
SHORTCUTS_PATH=\\\"$(SHORTCUTS_PATH)\\\"
all: src/nfs-mplayer webserver/nfsmplayer_web_server
src/nfs-mplayer:
./get_svn_revision.sh
+cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make
cd src && $(LRELEASE) nfs-mplayer.pro
webserver/nfsmplayer_web_server:
cd webserver && make
clean:
if [ -f src/Makefile ]; then cd src && make distclean; fi
-rm src/translations/nfs-mplayer_*.qm
-rm webserver/nfsmplayer_web_server
install: all
-install -d $(DESTDIR)$(PREFIX)/bin/
install -m 755 src/nfs-mplayer $(DESTDIR)$(PREFIX)/bin/
-install -d $(DESTDIR)$(DATA_PATH)
install -m 644 src/input.conf $(DESTDIR)$(DATA_PATH)
-install -d $(DESTDIR)$(TRANSLATION_PATH)
install -m 644 src/translations/*.qm $(DESTDIR)$(TRANSLATION_PATH)
-install -d $(DESTDIR)$(DOC_PATH)
# install -m 644 Changelog *.txt $(DESTDIR)$(DOC_PATH)
install -m 755 webserver/nfsmplayer_web_server $(DESTDIR)$(PREFIX)/bin/
-install -d $(DESTDIR)$(DOC_PATH)
tar -C docs/ --exclude=.svn -c -f - . | tar -C $(DESTDIR)$(DOC_PATH) -x -f -
-install -d $(DESTDIR)$(SHORTCUTS_PATH)
cp src/shortcuts/* $(DESTDIR)$(SHORTCUTS_PATH)
# -install -d $(DESTDIR)$(THEMES_PATH)
# -tar -C src/themes/ --exclude=.svn -c -f - . | tar -C $(DESTDIR)$(THEMES_PATH) -x -f -
-install -d $(DESTDIR)$(ICONS_DIR)/512x512/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/256x256/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/192x192/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/128x128/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/64x64/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/32x32/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/22x22/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/16x16/apps/
-install -d $(DESTDIR)$(ICONS_DIR)/scalable/apps/
-install -d $(DESTDIR)/lib/systemd/system-sleep/
install -m 644 icons/nfs-mplayer_icon512.png $(DESTDIR)$(ICONS_DIR)/512x512/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon256.png $(DESTDIR)$(ICONS_DIR)/256x256/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon192.png $(DESTDIR)$(ICONS_DIR)/192x192/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon128.png $(DESTDIR)$(ICONS_DIR)/128x128/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon64.png $(DESTDIR)$(ICONS_DIR)/64x64/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon32.png $(DESTDIR)$(ICONS_DIR)/32x32/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon22.png $(DESTDIR)$(ICONS_DIR)/22x22/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer_icon16.png $(DESTDIR)$(ICONS_DIR)/16x16/apps/nfs-mplayer.png
install -m 644 icons/nfs-mplayer.svg $(DESTDIR)$(ICONS_DIR)/scalable/apps/nfs-mplayer.svg
-install -d $(DESTDIR)$(APPLNK_DIR)
install -m 644 nfs-mplayer.desktop $(DESTDIR)$(APPLNK_DIR)
install -m 644 nfs-mplayer_enqueue.desktop $(DESTDIR)$(APPLNK_DIR)
-install -d $(DESTDIR)$(PREFIX)/share/man/man1/
install -m 644 man/nfs-mplayer.1 $(DESTDIR)$(PREFIX)/share/man/man1/
install -m 755 nfs-mplayer $(DESTDIR)/lib/systemd/system-sleep/
gzip -9 -f $(DESTDIR)$(PREFIX)/share/man/man1/nfs-mplayer.1
uninstall:
-rm -f $(PREFIX)/bin/nfs-mplayer
-rm -f $(DATA_PATH)/input.conf
-rm -f $(TRANSLATION_PATH)/*.qm
-rm -f $(DOC_PATH)/Changelog
-rm -f $(DOC_PATH)/*.txt
-rm -f $(SHORTCUTS_PATH)/*.keys
-rm -f $(ICONS_DIR)/64x64/apps/nfs-mplayer.png
-rm -f $(ICONS_DIR)/32x32/apps/nfs-mplayer.png
-rm -f $(ICONS_DIR)/22x22/apps/nfs-mplayer.png
-rm -f $(ICONS_DIR)/16x16/apps/nfs-mplayer.png
-rm -f $(APPLNK_DIR)/nfs-player.desktop
-rm -f $(PREFIX)/share/man/man1/nfs-mplayer.1.gz
-rm -f /lib/systemd/system-sleep/nfs-mplayer
-rmdir $(SHORTCUTS_PATH)/
-rmdir $(TRANSLATION_PATH)/
# -for file in docs/*/*; do \
# rm -f $(DOC_PATH)/$${file/docs/}; \
# done;
# -for file in docs/*; do \
# rmdir $(DOC_PATH)/$${file/docs/}; \
# done;
-(cd docs && find -iname '*.html') | (cd $(DESTDIR)$(DOC_PATH) && xargs rm)
-(cd docs && find -type d -name '??') | (cd $(DESTDIR)$(DOC_PATH) && xargs rmdir)
-rmdir $(DOC_PATH)/
-rmdir $(DATA_PATH)/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化