summaryrefslogtreecommitdiffstats
path: root/2019/talks/22.md
blob: 8099a3e3550fb0ebfce78b9b099b2fc95d38a71c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[[!meta title="Packaging emacs packages for Debian - David Bremner"]]
[[!meta copyright="Copyright © 2019 David Bremner"]]

[[!template  id=vid
src="https://mirror.csclub.uwaterloo.ca/emacsconf/2019/emacsconf-2019-22-packaging-emacs-packages-for-debian--bremner.webm"
type="video/webm"]]

### Download

- [Video](https://mirror.csclub.uwaterloo.ca/emacsconf/2019/emacsconf-2019-22-packaging-emacs-packages-for-debian--bremner.webm) (1080p)

### Notes

```org
#+TITLE: Packaging Emacs packages for Debian
#+AUTHOR: David Bremner
#+PROPERTY: header-args:sh :results output :session demo :output session
* Why Debian Packages for Emacs addons?
** For users
- Extra layer of curation 
- Integration testing
- Non-emacs dependencies are easy
- Co-operates with other =package.el= sources, e.g. /Melpa stable/.
** For admins
- Familiar tools
- Known trust model
- Building VM images
- Stable releases

* Packaging demo
** setup
#+begin_src sh :var dir=(expand-file-name default-directory)
export SUDO_ASKPASS=/usr/bin/ssh-askpass
export DPKG_COLORS=never
export DEBIAN_FRONTEND=noninteractive
cd $dir
rm -rf build
mkdir build
cd build
#+end_src

** grab the source
#+begin_src sh
git clone -q -o upstream https://github.com/takaxp/org-tree-slide.git
#+end_src

** generate the packaging
#+begin_src sh
cd org-tree-slide
dh-make-elpa --pkg-emacsen
#+end_src

** inspecting the results
#+begin_src elisp
(dired "build/org-tree-slide/debian")
(dired-hide-details-mode)
#+end_src

** building the package

#+begin_src sh
dpkg-buildpackage -uc -us -b
#+end_src

** install the package
#+begin_src sh
sudo -A env NEEDRESTART_SUSPEND=y DEBIAN_FRONTEND=noninteractive \
        apt-get install --reinstall -q -y  ../elpa-org-tree-slide*.deb </dev/null
#+end_src

** activate the package
#+begin_src elisp
(package-initialize)
(locate-library "org-tree-slide")
#+end_src

#+begin_src sh
dpkg -L elpa-org-tree-slide < /dev/null
#+end_src

* Cleanup this buffer
#+begin_src elisp
(org-babel-remove-result-one-or-many 't)
#+end_src

* Configuration
# Local Variables:
# org-confirm-babel-evaluate: nil
# End:
```