| 1 | (defpkgbuild lipsmoke |
| 2 | ;; — identity — |
| 3 | :pkgname "lipsmoke" |
| 4 | :pkgver "1.0" |
| 5 | :pkgrel 1 |
| 6 | :pkgdesc "a tiny smoke test that a lip package builds end to end" |
| 7 | :arch '(:any) |
| 8 | :url "https://example.org/lipsmoke" |
| 9 | :license "MIT" |
| 10 | ;; — dependencies — |
| 11 | :depends '("bash") |
| 12 | ;; — sources & integrity — |
| 13 | :source '("lipsmoke.sh" "readme.txt") |
| 14 | :b2sums '("0d2649f267def0d9a231544898208afd025f675015b38ad05e3806c136ec8ecd176fe29f3988b4be078e08c63f34178e966e15bfc17c7f738e86db0fb4107276" |
| 15 | "5eae74e3630b54f9271b53c7a1ad8b665e687efe08ec193b730ff36dc69c171021b2ecedcc6658e462c9f7c513bc87a76e0faf49326d60eb04d3323b36e72da1") |
| 16 | ;; — phases: one of each, including the loop/glob payoff — |
| 17 | :build |
| 18 | (lambda () |
| 19 | (run "install -m755 lipsmoke.sh just") |
| 20 | (echo "lipsmoke: build finished")) |
| 21 | :package |
| 22 | (lambda () |
| 23 | (run "install -Dm755 just ~a/usr/bin/lipsmoke" (pkgdir)) |
| 24 | (for-each (lambda (doc) |
| 25 | (run "install -Dm644 ~a ~a/usr/share/doc/lipsmoke/~a" doc (pkgdir) doc)) |
| 26 | (glob "*.txt")) |
| 27 | (echo "lipsmoke: package finished")) |
| 28 | ;; — .install hooks, inline; pacman hands the versions as arguments — |
| 29 | :pre-install |
| 30 | (lambda (newver) |
| 31 | (echo (format "lipsmoke: pre-installing ~a" newver)) |
| 32 | (echo "lipsmoke: pre-done")) |
| 33 | :post-install |
| 34 | (lambda (newver) |
| 35 | (echo (format "lipsmoke: installed ~a, run lipsmoke for a hello" newver)))) |
| 36 | |