-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/sh | ||
|
||
APPNAME='fontlink' | ||
DATA_DIR='../..' | ||
|
||
BUILD_DIR=build | ||
mkdir -p $BUILD_DIR | ||
|
||
cp -r $DATA_DIR/bin $BUILD_DIR | ||
|
||
INSTALL_DIR=$BUILD_DIR/usr/share | ||
|
||
mkdir -p $INSTALL_DIR | ||
rsync -a --exclude=**__pycache__* $DATA_DIR/${APPNAME} $INSTALL_DIR | ||
|
||
|
||
# Compile mo | ||
grep -v '^#' $DATA_DIR/po/LINGUAS | while read -r lang; | ||
do | ||
modir=$INSTALL_DIR/locale/$lang/LC_MESSAGES; | ||
mkdir -p $modir; | ||
msgfmt $DATA_DIR/po/$lang.po -o $modir/${APPNAME}.mo; | ||
done | ||
|
||
# Icons | ||
rsync -a --exclude=*x*/*/*.svg $DATA_DIR/data/icons $INSTALL_DIR | ||
|
||
# Desktop file | ||
DESKTOP_DIR=$INSTALL_DIR/applications | ||
mkdir -p $DESKTOP_DIR | ||
cp $DATA_DIR/data/${APPNAME}.desktop $DESKTOP_DIR | ||
|
||
# Docs | ||
DOC_DIR=$INSTALL_DIR/doc/${APPNAME} | ||
mkdir -p $DOC_DIR | ||
cp $DATA_DIR/LICENSE $DOC_DIR/copyright | ||
|
||
cp changelog $DOC_DIR/changelog.Debian | ||
gzip -9 $DOC_DIR/changelog.Debian | ||
|
||
|
||
# DEBIAN | ||
DEB_DIR=$BUILD_DIR/DEBIAN | ||
mkdir -p $DEB_DIR | ||
|
||
cp postinst prerm $DEB_DIR | ||
cp control.in $DEB_DIR/control | ||
|
||
set -- `cd ${DATA_DIR}/${APPNAME}; python3 -B -c \ | ||
'from app_info import *; print(VERSION, WEBSITE)'` | ||
version=$1 | ||
website=$2 | ||
size=`find ${BUILD_DIR} -type f -not -path "${DEB_DIR}/*" -print0 | | ||
xargs -r0 du --apparent-size -chk | tail -n -1 | awk '{print $1}'` | ||
|
||
sed \ | ||
-e "s/@VERSION@/${version}/" \ | ||
-e "s/@SIZE@/${size}/" \ | ||
-e "s,@URL@,${website}," \ | ||
-i $DEB_DIR/control | ||
|
||
|
||
chmod -R u+rwX,go+rX,go-w $BUILD_DIR | ||
chmod +x $DEB_DIR/postinst $DEB_DIR/prerm $BUILD_DIR/bin/${APPNAME} | ||
|
||
|
||
fakeroot dpkg-deb --build $BUILD_DIR . | ||
|
||
rm -rf $BUILD_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Package: fontlink | ||
Version: @VERSION@-1 | ||
Architecture: all | ||
Maintainer: Daniel Plachotich <[email protected]> | ||
Installed-Size: @SIZE@ | ||
Depends: python3, python3-gi, gir1.2-appindicator3-0.1 | ||
Section: utils | ||
Priority: optional | ||
Homepage: @URL@ | ||
Description: Small utility to install fonts temporarily | ||
FontLink is a small GTK+ utility to install fonts temporarily on Unix-like | ||
systems. | ||
. | ||
It allows you to quickly install certain fonts only when you really | ||
need them without copying fonts or creating symlinks to special | ||
directories by hand. | ||
. | ||
FontLink has a very simple interface with which you can group fonts into | ||
sets (for example, one set per project) and quickly enable or disable | ||
certain fonts as well as entire sets in a single click. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
python3 -m compileall -q /usr/share/fontlink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
find usr/share/fontlink -name __pycache__ -type d -exec rm -rf {} + |