|
|
|
|
@ -12,8 +12,9 @@ CMAKE_COMMAND = cmake
|
|
|
|
|
CMAKE_SOURCE_DIR = ./source
|
|
|
|
|
CMAKE_BUILD_DIR = ./compile
|
|
|
|
|
DEPENDS = cmake
|
|
|
|
|
PKGNAME = $(MAKEFILE_DIR)
|
|
|
|
|
#PKGNAME = ubl-settings-datetime
|
|
|
|
|
pkgname = $(MAKEFILE_DIR)
|
|
|
|
|
#pkgname = ubl-settings-datetime
|
|
|
|
|
pkgdir =
|
|
|
|
|
|
|
|
|
|
default_target: all
|
|
|
|
|
all: init build
|
|
|
|
|
@ -47,10 +48,10 @@ prepare:
|
|
|
|
|
|
|
|
|
|
check:
|
|
|
|
|
@echo "Check ..."; \
|
|
|
|
|
if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \
|
|
|
|
|
if [ -f ${CMAKE_BUILD_DIR}/${pkgname} ]; then \
|
|
|
|
|
echo "Check: OK"; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not fount !"; \
|
|
|
|
|
echo "Check: ${CMAKE_BUILD_DIR}/${pkgname} not fount !"; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
@ -68,18 +69,18 @@ uninstall:
|
|
|
|
|
$(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
|
|
|
|
|
done
|
|
|
|
|
@for SIZE in 16x16 32x32 48x48 scalable; do \
|
|
|
|
|
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.svg"; \
|
|
|
|
|
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.png"; \
|
|
|
|
|
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.svg"; \
|
|
|
|
|
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.png"; \
|
|
|
|
|
done
|
|
|
|
|
@for FILE_SVG in $(wildcard *.svg); do \
|
|
|
|
|
for SIZE in 16x16 32x32 48x48 scalable; do \
|
|
|
|
|
$(RM) "/usr/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
|
|
|
|
|
done; \
|
|
|
|
|
done
|
|
|
|
|
@$(RM) "/usr/bin/${PKGNAME}"
|
|
|
|
|
@$(RM) "/usr/share/applications/${PKGNAME}.desktop"
|
|
|
|
|
@$(RM) "/usr/share/polkit-1/actions/ru.ublinux.pkexec.${PKGNAME}.exec.policy"
|
|
|
|
|
@$(RM) -rd "/usr/share/${PKGNAME}"
|
|
|
|
|
@$(RM) "/usr/bin/${pkgname}"
|
|
|
|
|
@$(RM) "/usr/share/applications/${pkgname}.desktop"
|
|
|
|
|
@$(RM) "/usr/share/polkit-1/actions/ru.ublinux.pkexec.${pkgname}.exec.policy"
|
|
|
|
|
@$(RM) -rd "/usr/share/${pkgname}"
|
|
|
|
|
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null
|
|
|
|
|
@update-desktop-database --quiet 2>/dev/null
|
|
|
|
|
@touch /usr/share/applications
|
|
|
|
|
@ -89,27 +90,27 @@ install: check uninstall
|
|
|
|
|
@echo "Install ..."
|
|
|
|
|
@for FILE_PO in $(wildcard *.po); do \
|
|
|
|
|
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
|
|
|
|
|
install -dm755 /usr/share/locale/$${LANG}/LC_MESSAGES; \
|
|
|
|
|
install -dm755 "${pkgdir}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
|
|
|
|
|
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
|
|
|
|
|
PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
|
|
|
|
|
PATH_FILE_MO="${pkgdir}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
|
|
|
|
|
echo $${FILE_PO}; \
|
|
|
|
|
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
|
|
|
|
|
done
|
|
|
|
|
@for SIZE in 16 32 48; do \
|
|
|
|
|
install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \
|
|
|
|
|
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \
|
|
|
|
|
install -dm755 "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
|
|
|
|
|
rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data ${pkgname}.svg -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${pkgname}.png"; \
|
|
|
|
|
done
|
|
|
|
|
@install -dm755 /usr/share/icons/hicolor/scalable/apps
|
|
|
|
|
@install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
|
|
|
|
|
@install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
|
|
|
|
|
@install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
|
|
|
|
|
@install -Dm644 -t /usr/share/polkit-1/actions/ ru.ublinux.pkexec.${PKGNAME}.exec.policy
|
|
|
|
|
@install -dm755 /usr/share/${PKGNAME}/{ui,images,css}
|
|
|
|
|
@install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade
|
|
|
|
|
@install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css
|
|
|
|
|
@install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg
|
|
|
|
|
@install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png
|
|
|
|
|
@install -Dm644 -t /usr/share/${PKGNAME}/images/ bg_top.png
|
|
|
|
|
@install -dm755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "${pkgname}.svg"
|
|
|
|
|
@install -Dm755 -t "${pkgdir}/usr/bin/" "${CMAKE_BUILD_DIR}/${pkgname}"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/polkit-1/actions/" "ru.ublinux.pkexec.${pkgname}.exec.policy"
|
|
|
|
|
@install -dm755 "${pkgdir}/usr/share/${pkgname}"/{ui,images,css}
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/ui/" "${pkgname}.glade"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/css/" style.css
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.svg"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.png"
|
|
|
|
|
@install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" bg_top.png
|
|
|
|
|
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/
|
|
|
|
|
@update-desktop-database --quiet 2>/dev/null
|
|
|
|
|
@touch /usr/share/applications
|
|
|
|
|
|