From 070c9efab5dda1cfc6ced2d4e00fae1b0fb82530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20Myczko?= Date: Mon, 1 Mar 2021 15:46:47 +0100 Subject: [PATCH] add manpage, makefile, and rpm spec file --- README.md | 3 +-- fnt | 1 - fnt.1 | 31 +++++++++++++++++++++++++++++++ fnt.spec | 45 +++++++++++++++++++++++++++++++++++++++++++++ makefile | 30 ++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 fnt.1 create mode 100644 fnt.spec create mode 100644 makefile diff --git a/README.md b/README.md index a451124..55f2588 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Host them yourself, here's [why](https://wicki.io/posts/2020-11-goodbye-google-f # Installation ``` -cp fnt /usr/bin -chmod +x /usr/bin/fnt +make install ``` # Usage diff --git a/fnt b/fnt index 988c7c0..2192c8c 100755 --- a/fnt +++ b/fnt @@ -4,7 +4,6 @@ # alex@aiei.ch # # FIXME as user it installs to user directories, as root it installs system wide -# TODO tested and usable for linux and macOS # selfupdate=https://raw.githubusercontent.com/alexmyczko/fnt/main/fnt TMPDIR="${TMPDIR:-/tmp}" diff --git a/fnt.1 b/fnt.1 new file mode 100644 index 0000000..c34a6ca --- /dev/null +++ b/fnt.1 @@ -0,0 +1,31 @@ +.TH man 1 "01 Mar 2021" "1.1" "font downloader and manager" +.SH NAME +fnt \- download and install fonts +.SH SYNOPSIS +.TP +\fBfnt\fP \fIcommand\fP [\fIargument\fP] +.SH DESCRIPTION +This tool helps you to download vector fonts from +Debian sid, and Google Web Fonts. +.SH EXAMPLES +.TP +.I fnt update +update font index. +.TP +.I fnt search aga +search for fonts named aga. +.TP +.I fnt preview agave +install the font called agave. +.TP +.I fnt list +list installed fonts with glyphcount. +.SH SEE ALSO +birdfont(1), +bdf2sfd(1). +.SH BUGS +Please report to https://github.com/alexmyczko/fnt/issues +.SH AUTHOR +Alex Myczko +.SH INTERNET +https://github.com/alexmyczko/fnt diff --git a/fnt.spec b/fnt.spec new file mode 100644 index 0000000..803908f --- /dev/null +++ b/fnt.spec @@ -0,0 +1,45 @@ +Summary: Font manager command line tool +Name: fnt +Version: 1.1 +Release: 1 +License: MIT +Group: System/Utilities +Source: %{name}-%{version}.tar.gz +URL: https://github.com/alexmyczko/fnt +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%description +This software simplifies the task of backing up the system +configuration files (those under /etc) for UNIX systems +(Solaris, *BSD, Linux). You can run the program from any directory +and it will by default save the (maybe compressed) tarball to /root. +. +It is possible to encrypt the tarball, to upload the tarball to some +other host and run the backup automated in a cronjob. + +%prep +%setup + +%build + +%install +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +make DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} install +make DESTDIR=%{buildroot} install-config + +%clean +[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} + +%files +%defattr(-, root, root) +%doc COPYING changelog *.html *.png *.jpg +%{_bindir}/ibackup +%{_bindir}/sysconf +%config /etc/ibackup.conf +%{_mandir}/man1/* + +%changelog +* Sun Feb 28 2021 Alex Myczko +- Initial RPM release. diff --git a/makefile b/makefile new file mode 100644 index 0000000..0265d66 --- /dev/null +++ b/makefile @@ -0,0 +1,30 @@ +BINDIR=/usr/bin +MANDIR=/usr/share/man +VERSION=1.1 + +all: + @echo make install to install the software + @echo make uninstall to remove the software + @echo make rpm to create a .rpm + +install: + if test ! -d $(DESTDIR)/$(BINDIR) ; then mkdir -p $(DESTDIR)/$(BINDIR) ; fi + install -m 755 fnt $(DESTDIR)/$(BINDIR)/ + if test ! -d $(DESTDIR)/$(MANDIR)/man1 ; then mkdir -p $(DESTDIR)/$(MANDIR)/man1; fi + install -c -m 644 fnt.1 $(DESTDIR)/$(MANDIR)/man1/ ; gzip -9 $(DESTDIR)/$(MANDIR)/man1/fnt.1 + +uninstall: + rm -f $(DESTDIR)/$(BINDIR)/fnt + rm -f $(DESTDIR)/$(MANDIR)/man1/fnt.1.gz + +clean: + @echo nothing to clean + +release: + cd .. ; tar cf fnt-$(VERSION).tar --exclude-vcs fnt ; xz -9f fnt-$(VERSION).tar + +rpm: + mkdir -p /usr/src/rpm/SOURCES/ + mkdir -p /usr/src/rpm/BUILD + cp ../fnt-${VERSION}.tar.gz /usr/src/rpm/SOURCES/ + rpm -bb fnt.spec