Permalink
Browse files

Fixed dependencies in Makefile, updated README.md

  • Loading branch information...
1 parent fdca0f3 commit 27f09b4f6b30454a69a22e67c85e88425505f006 @czarkoff czarkoff committed Nov 28, 2012
Showing with 18 additions and 5 deletions.
  1. +8 −3 Makefile
  2. +9 −1 README.md
  3. +1 −1 ppub.py → ppub.py.in
View
@@ -6,12 +6,13 @@ 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:
+install-bin: ppub
install -d ${BINDIR}
install -d ${PPUBDIR}
install ppub ${BINDIR}
@@ -42,11 +43,15 @@ install-desktop:
${PREFIX}/share/applications/ppub.desktop
clean:
- rm ppub
+ rm -f ppub ppub.py
-uninstall:
+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
View
@@ -24,7 +24,15 @@ Installation
------------
- For Archlinux: Install ppub from AUR.
- For Salix: slapt-src -i ppub
-- For other distros: Place ppub inside /usr/bin and everything else inside /usr/share/ppub/. There are optional icons and .desktop files inside ./misc.
+- For other Linux distros and BSDs:
+
+ make install
+
+This command will install ppub under "/usr" prefix and configure it to invoke python 2.x via "/usr/bin/python2" command. To alter this behavior set PREFIX and PYTHON environment variables, eg.:
+
+ PREFIX=/usr/local PYTHON=`which python2.7` make install
+
+Also note, icons and desktop file are installed by default. If you want to install only the program itself, invoke make with "install-bin" target instead of "install".
Configuration
-------------
View
@@ -488,7 +488,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/ppub/night.css"
else:
settings.props.user_stylesheet_uri = "file://"+self.config.get("Main", "usercss")
self.reload_chapter()

0 comments on commit 27f09b4

Please sign in to comment.