Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added makefile

  • Loading branch information...
commit e2ac93e3ff54daf67e1d4eb255b707dbf90642b7 2 parents 7bc9d23 + ad0d33d
@sakisds authored
Showing with 59 additions and 4 deletions.
  1. +58 −0 Makefile
  2. +0 −3  ppub
  3. +1 −1  ppub.py → ppub.py.in
View
58 Makefile
@@ -0,0 +1,58 @@
+PREFIX ?= /usr
+PPUBDIR = ${PREFIX}/share/ppub
+BINDIR = ${PREFIX}/bin
+PYTHON ?= ${BINDIR}/python2
+
+all: ppub
+
+ppub:
+ sed 's|PREFIX|${PREFIX}|' ppub.py.in > ppub.py
+ echo "#!/bin/sh" > ppub
+ echo "${PYTHON} ${PPUBDIR}/ppub.py \"\$$@\"" >> ppub
+
+install: install-bin install-desktop
+
+install-bin: ppub
+ install -d ${BINDIR}
+ install -d ${PPUBDIR}
+ install ppub ${BINDIR}
+ install -m 644 contentprovider.py ${PPUBDIR}/contentprovider.py
+ install -m 644 dialogs.py ${PPUBDIR}/dialogs.py
+ install -m 644 night.css ${PPUBDIR}/night.css
+ install -m 644 ppub.py ${PPUBDIR}/ppub.py
+ install -m 644 xml2obj.py ${PPUBDIR}/xml2obj.py
+
+install-desktop:
+ install -d ${PREFIX}/share/icons/hicolor/24x24/apps
+ install -d ${PREFIX}/share/icons/hicolor/32x32/apps
+ install -d ${PREFIX}/share/icons/hicolor/48x48/apps
+ install -d ${PREFIX}/share/icons/hicolor/64x64/apps
+ install -d ${PREFIX}/share/icons/hicolor/scalable/apps
+ install -d ${PREFIX}/share/applications
+ install -m644 misc/ppub-24.png \
+ ${PREFIX}/share/icons/hicolor/24x24/apps/ppub.png
+ install -m644 misc/ppub-32.png \
+ ${PREFIX}/share/icons/hicolor/32x32/apps/ppub.png
+ install -m644 misc/ppub-48.png \
+ ${PREFIX}/share/icons/hicolor/48x48/apps/ppub.png
+ install -m644 misc/ppub-64.png \
+ ${PREFIX}/share/icons/hicolor/64x64/apps/ppub.png
+ install -m644 misc/ppub-scalable.svg \
+ ${PREFIX}/share/icons/hicolor/scalable/apps/ppub.svg
+ install -m644 misc/ppub.desktop \
+ ${PREFIX}/share/applications/ppub.desktop
+
+clean:
+ rm -f ppub ppub.py
+
+uninstall: uninstall-bin uninstall-desktop
+
+uninstall-bin:
+ rm -rf ${PPUBDIR}
+ rm -rf ${BINDIR}/ppub
+
+uninstall-desktop:
+ rm -f ${PREFIX}/share/applications/ppub.desktop
+ rm -f ${PREFIX}/share/icons/hicolor/*/apps/ppub.png
+
+.PHONY: all install install-bin install-desktop
View
3  ppub
@@ -1,3 +0,0 @@
-#!/bin/bash
-#Installed by ppub. Read /usr/share/ppub/README.md
-/usr/share/ppub/ppub.py $1
View
2  ppub.py → ppub.py.in 100755 → 100644
@@ -513,7 +513,7 @@ def on_change_style(self, widget, data): #0=Def, 1=Night, 2=User
if data == 0:
settings.props.user_stylesheet_uri = ""
elif data == 1:
- settings.props.user_stylesheet_uri = "file:///usr/share/ppub/night.css"
+ settings.props.user_stylesheet_uri = "file://PREFIX/share/ppub/night.css"
else:
settings.props.user_stylesheet_uri = "file://"+self.config.get("Main", "usercss")+"/"+widget.get_label()+".css"
self.reload_chapter()
Please sign in to comment.
Something went wrong with that request. Please try again.