Skip to content

Commit

Permalink
add manpage, makefile, and rpm spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmyczko committed Mar 1, 2021
1 parent a17b908 commit 070c9ef
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion fnt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# [email protected]
#
# 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}"
Expand Down
31 changes: 31 additions & 0 deletions fnt.1
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
.SH INTERNET
https://github.com/alexmyczko/fnt
45 changes: 45 additions & 0 deletions fnt.spec
Original file line number Diff line number Diff line change
@@ -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.
30 changes: 30 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 070c9ef

Please sign in to comment.