ports

Personal OpenBSD ports.
git clone git://git.zepp.club/ports.git
Log | Files | Refs | README

patch-release_makefile (2073B)


      1 --- release.makefile.orig	Mon Jun 24 04:35:59 2024
      2 +++ release.makefile	Mon Jun 24 05:32:30 2024
      3 @@ -1,41 +1,41 @@
      4 -
      5 +PREFIX := /usr/local
      6  BUILD_DIR := build
      7 -INSTALL_DIR := ${PREFIX}/opt/stremio
      8 -
      9 +INSTALL_DIR := ${PREFIX}/share/stremio
     10  ICON_BIN := smartcode-stremio.svg
     11 -
     12 +SERVER_URL != cat server-url.txt
     13 +STREMIO_BIN := ${INSTALL_DIR}/stremio
     14 +CORES != sysctl -n hw.ncpu
     15 +NODE != which node
     16  SERVER_JS := server.js
     17  
     18 -STREMIO_BIN := ${BUILD_DIR}/stremio
     19 -
     20  ALL: ${STREMIO_BIN} ${SERVER_JS} icons
     21  
     22  install:
     23  	make -C ${BUILD_DIR} install
     24 +	mkdir -p ${INSTALL_DIR}
     25 +	install -Dm 755 "$(BUILD_DIR)/stremio" "$(INSTALL_DIR)/stremio"
     26  	install -Dm 644 ${SERVER_JS} "${INSTALL_DIR}/server.js"
     27  	install -Dm 644 smartcode-stremio.desktop "${INSTALL_DIR}/smartcode-stremio.desktop"
     28  	cp -r icons "${INSTALL_DIR}/"
     29 -	ln -s "${shell which node}" "${INSTALL_DIR}/node"
     30 -ifneq ("$(wildcard ../mpv-build/mpv/build)","")
     31 -	cp ../mpv-build/mpv/build/libmpv.so* "${INSTALL_DIR}/"
     32 -endif
     33 +	ln -sf $(NODE) "${INSTALL_DIR}/node"
     34 +	ln -sf "$(INSTALL_DIR)"/stremio /usr/local/bin/stremio
     35  
     36  uninstall:
     37 -	rm -f /usr/bin/stremio
     38 +	rm -f /usr/local/bin/stremio
     39  	rm -fr "${INSTALL_DIR}"
     40  
     41  icons:
     42  	mkdir -p "$@"
     43 -	cd "$@" && printf 16,22,24,32,64,128 | xargs -I^ -d, sh -c 'rsvg-convert ../images/stremio.svg -w ^ -o smartcode-stremio_^.png && rsvg-convert ../images/stremio_tray_white.svg -w ^ -o smartcode-stremio-tray_^.png'
     44 +	cd "$@" && for size in 16 22 24 32 64 128; do rsvg-convert ../images/stremio.svg -w "$$size" -o "smartcode-stremio_$${size}.png" && rsvg-convert ../images/stremio_tray_white.svg -w "$$size" -o "smartcode-stremio-tray_$${size}.png"; done
     45 + 
     46  
     47  ${SERVER_JS}: 
     48 -	wget "${shell cat server-url.txt}" -qO ${SERVER_JS} || rm ${SERVER_JS}
     49 +	curl -s $(SERVER_URL) -o ${SERVER_JS} || rm ${SERVER_JS}
     50  
     51  ${STREMIO_BIN}:
     52  	mkdir -p ${BUILD_DIR}
     53  	cd ${BUILD_DIR} && cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}" ..
     54 -	make -j -C ${BUILD_DIR}
     55 +	make -j $(CORES) -C ${BUILD_DIR}
     56  
     57  clean:
     58  	rm -rf ${BUILD_DIR} ${SERVER_JS} icons
     59 -