Skip to content

Commit 16bbae0

Browse files
committed
control and makefile to build .DEB package with /make deb/
1 parent 06ddb53 commit 16bbae0

File tree

3 files changed

+69
-51
lines changed

3 files changed

+69
-51
lines changed

pkgs/debian/control

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Package: unix-notes
2+
Version: 1.0
3+
Architecture: all
4+
Priority: optional
5+
Depends: gpg
6+
Maintainer: Ian Stanley
7+
Installed-Size: 20
8+
Homepage: https://github.com/Standard-Unix-Notes/unix-notes
9+
Bugs: https://github.com/Standard-Unix-Notes/unix-notes/issues
10+
Description: GPG encrypted notes and multi-notebook tools
11+
Notes should be easy to use and secure. We can manually encrypt a
12+
notefile quite easily with GnuPG and that is fine for a few files. But
13+
eventually we all collect many note files. Some notes are related to
14+
others and we decide to reorganize them by placing them in directories.
15+
All encryption is relatively transparent to the user. All notes and
16+
notebooks can be managed with standard Unix/Linux tools if the user
17+
desires.

pkgs/debian/desc

Lines changed: 0 additions & 51 deletions
This file was deleted.

pkgs/debian/makefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
PROGNAME=unix-notes
3+
VER=1.0
4+
ARCH=all
5+
PKGBUILDDIR=$(PROGNAME)_$(VER)_$(ARCH)
6+
BINDIR=usr/local/bin
7+
PKGBINDIR=$(PKGBUILDDIR)/$(BINDIR)
8+
MANPATH=usr/share/man/man1
9+
PKGMANDIR=$(PKGBUILDDIR)/$(MANPATH)
10+
PROGROOT=../..
11+
DEBIAN=$(PKGBUILDDIR)/DEBIAN
12+
13+
## make help: Show help
14+
help:
15+
@sed -n s/^##//p makefile
16+
17+
var:
18+
@echo PROGNAME = $(PROGNAME)
19+
@echo VER = $(VER)
20+
@echo ARCH = $(ARCH)
21+
@echo PKGBUILDIR = $(PKGBUILDDIR)
22+
@echo BINDIR = $(BINDIR)
23+
@echo PKGBINDIR = $(PKGBINDIR)
24+
@echo MANPATH = $(MANPATH)
25+
@echo PKGMANDIR = $(PKGMANDIR)
26+
@echo PROGROOT = $(PROGROOT)
27+
28+
## make build: Build .DEB package
29+
deb: clean prep build
30+
@echo Done.
31+
## make clean: Clean up after package build
32+
clean:
33+
-rm -rf $(PKGBUILDDIR) $(PKGBUILDDIR).deb $(PKGBUILDDIR).deb.sha256.txt
34+
35+
## make prep: Prepare environment for package build
36+
prep: clean
37+
-rm -rf $(PKGBUILDDIR)
38+
mkdir -p $(DEBIAN)
39+
mkdir -p $(PKGBINDIR)
40+
mkdir -p $(PKGMANDIR)
41+
sudo install -o root -m 755 $(PROGROOT)/notes $(PKGBINDIR)
42+
sudo install -o root -m 644 $(PROGROOT)/docs/notes.1 $(PKGMANDIR)
43+
sudo install -o root -m 644 $(PROGROOT)/docs/notebook.1 $(PKGMANDIR)
44+
install control $(DEBIAN)
45+
cd $(PKGBINDIR); ln -sf notes notebook
46+
47+
## make build: Build .DEB package
48+
build: prep
49+
@echo building Debian package
50+
dpkg-deb --build $(PKGBUILDDIR)
51+
sha256sum $(PKGBUILDDIR).deb | tee $(PKGBUILDDIR).deb.sha256.txt
52+

0 commit comments

Comments
 (0)