Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some more packaging, and man pages #134

Merged
merged 2 commits into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.*.swp
debian
/*.[0-9].gz
34 changes: 26 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
# spaces and underscores https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html
# Improve:
# Dependencies:
# build-dpkg: txt2man

APPNAME = chicago95
APPVERSION = 0.0.2
APPVERSION = 2.0.1
SRCDIR = $(CURDIR)
BUILDDIR = $(CURDIR)
prefix = /usr
SYSCONFDIR = $(DESTDIR)/etc
DEFAULTDIR = $(DESTDIR)/etc/sysconfig # for debian use '$(DESTDIR)/etc/default'
Expand All @@ -31,6 +33,7 @@ XDGAUTODIR = $(SYSCONFDIR)/xdg/autostart
FONTDIR = $(SHAREDIR)/fonts
THEMESDIR = $(SHAREDIR)/themes
SOUNDSDIR = $(SHAREDIR)/sounds
BKGDSDIR = $(SHAREDIR)/backgrounds/Chicago95

awkbin :=$(shell which awk)
chmodbin :=$(shell which chmod)
Expand All @@ -48,26 +51,33 @@ sortbin :=$(shell which sort)
truebin :=$(shell which true)
uniqbin :=$(shell which uniq)
xargsbin :=$(shell which xargs)
txt2manbin :=$(shell which txt2man)

use_underscores ?= NO

.PHONY: clean install install_files build_man uninstall list deplist deplist_opts
.PHONY: clean install install_files build_man uninstall list deplist deplist_opts build_man

nullstring :=
space :=\ $(nullstring)# end of the line
ifeq ($(use_underscores),YES)
space = _
endif

all:
@${echobin} "No compilation for this project."
all: build_man

list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'

build_man:
@# these man pages are installed with install_plus
@test -d ${BUILDDIR} || mkdir -p ${BUILDDIR}
${txt2manbin} -P chicago95-theme-plus -r chicago95-theme-plus -d "June 2020" -t "PlusGUI" -s 1 -v "General Commands Manual" < ${SRCDIR}/Plus/PlusGUI.1.txt | ${gzipbin} > ${BUILDDIR}/PlusGUI.1.gz
${txt2manbin} -P chicago95-theme-plus -r chicago95-theme-plus -d "June 2020" -t "Chicago95" -s 1 -v "General Commands Manual" < ${SRCDIR}/Plus/ChicagoPlus.1.txt | ${gzipbin} > ${BUILDDIR}/ChicagoPlus.1.gz

install: install_all

install_all: install_cursors install_doc install_fonts install_gtk_theme install_icons install_sounds install_login_sound install_boot_screen install_plus
.PHONY: install_cursors install_doc install_fonts install_gtk_theme install_icons install_sounds install_login_sound install_boot_screen install_plus install_backgrounds
install_all: install_cursors install_doc install_fonts install_gtk_theme install_icons install_sounds install_login_sound install_boot_screen install_plus install_backgrounds

install_cursors:
${installbin} -dm0755 \
Expand Down Expand Up @@ -132,8 +142,8 @@ install_boot_screen:
${installbin} -m0644 -t ${SHAREDIR}/plymouth/themes/RetroTux ${SRCDIR}/Plymouth/RetroTux/*

install_plus:
${installbin} -dm0755 ${SHAREDIR}/chicago95-theme-plus/assets ${BINDIR} ${LIBEXECDIR}/chicago95-theme-plus ${DOCDIR}/demo ${APPSDIR} ${MIMEDIR}
${installbin} -m0755 -t ${SHAREDIR}/chicago95-theme-plus/assets ${SRCDIR}/Plus/assets/*
${installbin} -dm0755 ${SHAREDIR}/chicago95-theme-plus/assets ${BINDIR} ${LIBEXECDIR}/chicago95-theme-plus ${DOCDIR}/demo ${APPSDIR} ${MIMEDIR} ${MANDIR}/man1
${installbin} -m0644 -t ${SHAREDIR}/chicago95-theme-plus/assets ${SRCDIR}/Plus/assets/*
${installbin} -m0755 ${SRCDIR}/Plus/ChicagoPlus.py ${BINDIR}/ChicagoPlus
${installbin} -m0755 ${SRCDIR}/Plus/PlusGUI.py ${BINDIR}/PlusGUI
${installbin} -m0644 -t ${LIBEXECDIR}/chicago95-theme-plus ${SRCDIR}/Plus/pluslib.py ${SRCDIR}/Plus/plus.glade
Expand All @@ -142,6 +152,12 @@ install_plus:
${installbin} -m0644 -t ${DOCDIR}/demo ${SRCDIR}/Plus/demo/*
${installbin} -m0644 -t ${APPSDIR} ${SRCDIR}/Plus/*.desktop
${installbin} -m0644 -t ${MIMEDIR} ${SRCDIR}/Plus/chicago95-plus-theme.xml
${installbin} -m0644 -t ${MANDIR}/man1 ${BUILDDIR}/*.1.gz

install_backgrounds:
${installbin} -dm0755 ${BKGDSDIR}/patterns ${BKGDSDIR}/wallpapers
${installbin} -m0644 -t ${BKGDSDIR}/patterns ${SRCDIR}/Extras/Backgrounds/Patterns/*
${installbin} -m0644 -t ${BKGDSDIR}/wallpapers ${SRCDIR}/Extras/Backgrounds/Wallpaper/*

uninstall:
${rmbin} -rf \
Expand All @@ -162,8 +178,10 @@ uninstall:
${LIBEXECDIR}/chicago95-theme-plus ${BINDIR}/ChicagoPlus ${BINDIR}/PlusGUI \
${SHAREDIR}/chicago95-theme-plus \
${APPSDIR}/PlusGUI.desktop ${MIMEDIR}/chicago95-plus-theme.xml \
${MANDIR}/man1/ChicagoPlus.1.gz ${MANDIR}/man1/PlusGUI.1.gz \
${SHAREDIR}/plymouth/themes/Chicago95 ${SHAREDIR}/plymouth/themes/RetroTux \
${BKGDSDIR} \
${XDGAUTODIR}/chicago95-startup.desktop

clean:
-@${echobin} "target $@ not implemented yet! Gotta say unh." && ${falsebin}
-${rmbin} ${BUILDDIR}/*.1.gz
45 changes: 45 additions & 0 deletions Plus/ChicagoPlus.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
NAME
ChicagoPlus - convert Windows 95 theme to Xfce theme
SYNOPSIS
ChicagoPlus [options] _filename_
OPTIONS
<filename> Theme file to convert
-h, --help show help message and exit
-d, --debug Print lots of debugging statements (default: 30)
-v, --verbose Be verbose (default: None)
--noinstall Do not place folders nor change theme (default: False)
--info Prints the json conversion of the theme file (default: False)

-c COLORS, --colors COLORS How many colors before skipping Inkscape fix/merge for SVGs. Set to 1 to speed up conversion. WARNING: This may result in transparent icons! (default: 32)

-o OVERLAP, --overlap OVERLAP Pixel overlap for SVG icons (default: 1)

-s SQUARESIZE, --squaresize SQUARESIZE Square size for SVG icons (default: 20)

--cursorfolder CURSORFOLDER Chicago95 cursor folder to convert to new theme (default: ~/.icons/Chicago95_Cursor_Black)

--themefolder THEMEFOLDER Chicago95 theme folder to convert to new theme (default: ~/.themes/Chicago95)

--iconsfolder ICONSFOLDER Chicago95 icons folder to convert to new theme (default: ~/.icons/Chicago95)

--installdir INSTALLDIR Folder to create new theme in, default is current working directory (default: . )

--logfile LOGFILE Filename for debug logging (default: chicago95_plus.log)

SPECIFIC INSTALLS
--nocursors Do not generate/install/enable the cursors (default: True)
--noicons Do not generate/install/enable the icons (default: True)
--nowallpaper Do not generate/install/enable the wallpaper (default: True)
--nosounds Do not generate/install/enable the sounds (default: True)
--nocolors Do not generate/install/enable the colors (default: True)
--nofonts Do not generate/install/enable the fonts (default: True)
--noscreensaver Do not generate/install the screensaver (default: True)
DESCRIPTION
Chicago95 Plus! is a python script that can parse Windows 95/98/ME/XP theme files and create new Chicago95 themes.
Chicago95 Plus! supports Icons, Cursors, Fonts, Wallpapers, Sounds and Theme colors! Use this against themes you can find on ThemeWorld or any site that have Microsoft Plus! Themes! This script can be called from any folder, execute it and provide it the path to a theme file (e.g. ChicagoPlus /home/bgates/Wicked/Wicked.theme) and your new theme will be created!
AUTHOR
grassmunk, adapted as a manpage by bgstack15
COPYRIGHT
GPL 3.0+
SEE ALSO
PlusGUI(1)
33 changes: 33 additions & 0 deletions Plus/PlusGUI.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
NAME
PlusGUI - gtk frontend for converting Windows 95 theme to Xfce theme
SYNOPSIS
PlusGUI [options] _filename_
OPTIONS
<filename> Theme file to convert
-h, --help show help message and exit
-d, --debug Print lots of debugging statements (default: 30)
-v, --verbose Be verbose (default: None)

-c COLORS, --colors COLORS How many colors before skipping Inkscape fix/merge for SVGs. Set to 1 to speed up conversion. WARNING: This may result in transparent icons! (default: 32)

-o OVERLAP, --overlap OVERLAP Pixel overlap for SVG icons (default: 1)

-s SQUARESIZE, --squaresize SQUARESIZE Square size for SVG icons (default: 20)

--cursorfolder CURSORFOLDER Chicago95 cursor folder to convert to new theme (default: ~/.icons/Chicago95_Cursor_Black)

--themefolder THEMEFOLDER Chicago95 theme folder to convert to new theme (default: ~/.themes/Chicago95)

--iconsfolder ICONSFOLDER Chicago95 icons folder to convert to new theme (default: ~/.icons/Chicago95)

--installdir INSTALLDIR Folder to create new theme in, default is current working directory (default: . )

--logfile LOGFILE Filename for debug logging (default: chicago95_plus.log)
DESCRIPTION
Display a graphical window to choose, preview, and build Xfce themes. PlusGUI looks identical to the Microsoft Plus! 95 "Desktop Themes" utility.
AUTHOR
grassmunk, adapted as a manpage by bgstack15
COPYRIGHT
GPL 3.0+
SEE ALSO
ChicagoPlus(1)