Skip to content

Commit

Permalink
Add a PKGBUILD example
Browse files Browse the repository at this point in the history
  • Loading branch information
seblu committed Jul 8, 2013
1 parent 76921de commit 98809c6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.*.swp
*~
TODO
*.in
Makefile
Makefile.in
*.tar.xz
configure
13 changes: 8 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with MAILBOOT. If not, see <http://www.gnu.org/licenses/>.

EXTRA_DIST = mailboot.in mailboot.service.in
EXTRA_DIST = mailboot.in mailboot.service.in PKGBUILD.in

CLEANFILES = mailboot mailboot.service
CLEANFILES = mailboot mailboot.service PKGBUILD

bin_SCRIPTS = mailboot
noinst_SCRIPTS = PKGBUILD
dist_doc_DATA = README COPYRIGHT LICENSE AUTHORS
systemdunit_DATA = mailboot.service

Expand All @@ -28,6 +29,9 @@ mailboot: mailboot.in
mailboot.service: mailboot.service.in
$(do_substitution) < $(srcdir)/$< > $@

PKGBUILD: PKGBUILD.in
$(do_substitution) < $(srcdir)/$< > $@

do_substitution = $(SED) \
-e 's,[@]bindir[@],$(bindir),g' \
-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
Expand All @@ -36,9 +40,8 @@ do_substitution = $(SED) \
check: mailboot
./mailboot -p

#install-exec-hook: mailboot.service
# install -dm755 $(DESTDIR)$(systemdunitdir)
# install -m644 mailboot.service $(DESTDIR)$(systemdunitdir)/mailboot.service
arch: PKGBUILD
makepkg -f

dist-hook:
rm -f $(distdir)/TODO
25 changes: 25 additions & 0 deletions PKGBUILD.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Maintainer: Sébastien Luttringer

pkgname=mailboot
pkgver=@VERSION@
pkgrel=1
pkgdesc='Send an email when your computer boot'
arch=('any')
url='https://github.com/seblu/mailboot'
license=('GPL')
depends=('bash' 'systemd')
source=("$pkgname-$pkgver.tar.xz")
md5sums=('SKIP')

build() {
cd $pkgname-$pkgver
./configure --prefix=/usr
make
}

package() {
cd $pkgname-$pkgver
make install DESTDIR="$pkgdir"
}

# vim:set ts=2 sw=2 et:

0 comments on commit 98809c6

Please sign in to comment.