summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-03-07 23:50:53 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-12 08:48:27 +0700
commitc18329b57362ecd52b5fc21491c1f61b951a9381 (patch)
tree077a584be58e1d855ad8ff82d9cbdc48aa4e50a8 /system
parenta75cc652c4640290a9784f8b68ce078d324244b3 (diff)
downloadslackbuilds-c18329b57362ecd52b5fc21491c1f61b951a9381.tar.gz
slackbuilds-c18329b57362ecd52b5fc21491c1f61b951a9381.tar.xz
system/dina-font: Add douninst.sh.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/dina-font/dina-font.SlackBuild5
-rw-r--r--system/dina-font/doinst.sh5
-rw-r--r--system/dina-font/douninst.sh14
3 files changed, 22 insertions, 2 deletions
diff --git a/system/dina-font/dina-font.SlackBuild b/system/dina-font/dina-font.SlackBuild
index c11f690ddf..41a01e03b7 100644
--- a/system/dina-font/dina-font.SlackBuild
+++ b/system/dina-font/dina-font.SlackBuild
@@ -26,6 +26,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230307 bkw: BUILD=2, add douninst.sh.
+
# 20180117 bkw:
# - update for v2.93, BUILD=1
# - original site has gone away, use gentoo distfiles for download and
@@ -52,7 +54,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dina-font
VERSION=${VERSION:-2.93}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -143,6 +145,7 @@ sed -e "s,@ANDCONSOLE@,$ANDCONSOLE," \
-e "s,@ONLY@,$ONLY," \
$CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/douninst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/dina-font/doinst.sh b/system/dina-font/doinst.sh
index 96b0162ebe..8bf0ea71d1 100644
--- a/system/dina-font/doinst.sh
+++ b/system/dina-font/doinst.sh
@@ -1,6 +1,6 @@
if [ -x /usr/bin/mkfontdir ]; then
( cd usr/share/fonts/misc
- if ! grep -q ^Dina_ fonts.alias 2>/dev/null; then
+ if ! grep -q '^Dina_\([689]\|10\) ' fonts.alias 2>/dev/null; then
echo 'Dina_6 -windows-dina-medium-r-normal--8-60-96-96-c-60-microsoft-cp1252' >> fonts.alias
echo 'Dina_8 -windows-dina-medium-r-normal--10-80-96-96-c-70-microsoft-cp1252' >> fonts.alias
echo 'Dina_9 -windows-dina-medium-r-normal--12-90-96-96-c-70-microsoft-cp1252' >> fonts.alias
@@ -10,6 +10,9 @@ if [ -x /usr/bin/mkfontdir ]; then
mkfontdir .
)
fi
+
+[ "$DISPLAY" != "" ] && xset fp rehash 2>/dev/null
+
if [ -x usr/bin/fc-cache ]; then
usr/bin/fc-cache -f
fi
diff --git a/system/dina-font/douninst.sh b/system/dina-font/douninst.sh
new file mode 100644
index 0000000000..f1bc56ae86
--- /dev/null
+++ b/system/dina-font/douninst.sh
@@ -0,0 +1,14 @@
+if [ -x /usr/bin/mkfontdir ]; then
+ ( cd usr/share/fonts/misc
+ grep -v '^Dina_\([689]\|10\) ' fonts.alias > fonts.alias.new
+ mv fonts.alias.new fonts.alias
+ mkfontscale .
+ mkfontdir .
+ )
+fi
+
+[ "$DISPLAY" != "" ] && xset fp rehash 2>/dev/null
+
+if [ -x usr/bin/fc-cache ]; then
+ usr/bin/fc-cache -f
+fi