version 1.9, 2016/02/14 15:40:03
|
version 1.10, 2021/11/02 13:53:21
|
Line 90 long ago in pkgsrc-wip
|
Line 90 long ago in pkgsrc-wip
|
|
|
Makefile: |
Makefile: |
|
|
[[!format make """ |
[[!format makefile """ |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
|
|
PKGNAME= osxinfo-0.1 |
PKGNAME= osxinfo-0.1 |
Line 197 these targets, like
|
Line 197 these targets, like
|
The framework uses an `mk.conf` file, usually found in /etc. Here's |
The framework uses an `mk.conf` file, usually found in /etc. Here's |
how mine looks: |
how mine looks: |
|
|
[[!format make """ |
[[!format makefile """ |
# Tue Oct 15 21:21:46 CEST 2013 |
# Tue Oct 15 21:21:46 CEST 2013 |
|
|
.ifdef BSD_PKG_MK # begin pkgsrc settings |
.ifdef BSD_PKG_MK # begin pkgsrc settings |
Line 312 on the program's homepage.
|
Line 312 on the program's homepage.
|
Here's how they look like at the moment: |
Here's how they look like at the moment: |
|
|
Makefile: |
Makefile: |
[[!format make """ |
[[!format makefile """ |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
|
|
DISTNAME= 2bwm-0.1 |
DISTNAME= 2bwm-0.1 |
Line 395 in our Makefile.
|
Line 395 in our Makefile.
|
Clean, build again, and add more dependencies until it passes the |
Clean, build again, and add more dependencies until it passes the |
build stage. Here's how my Makefile ends up looking like: |
build stage. Here's how my Makefile ends up looking like: |
|
|
[[!format make """ |
[[!format makefile """ |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
|
|
DISTNAME= 2bwm-0.1 |
DISTNAME= 2bwm-0.1 |
Line 452 how 2bwm installs:
|
Line 452 how 2bwm installs:
|
|
|
From 2bwm's Makefile: |
From 2bwm's Makefile: |
|
|
[[!format make """ |
[[!format makefile """ |
install: $(TARGETS) |
install: $(TARGETS) |
test -d $(DESTDIR)$(PREFIX)/bin || mkdir -p $(DESTDIR)$(PREFIX)/bin |
test -d $(DESTDIR)$(PREFIX)/bin || mkdir -p $(DESTDIR)$(PREFIX)/bin |
install -pm 755 2bwm $(DESTDIR)$(PREFIX)/bin |
install -pm 755 2bwm $(DESTDIR)$(PREFIX)/bin |
Line 550 You should be able to fix the prefix err
|
Line 550 You should be able to fix the prefix err
|
the patching explained above thanks to the sed substitution framework. |
the patching explained above thanks to the sed substitution framework. |
Here's how it looks like in my port Makefile: |
Here's how it looks like in my port Makefile: |
|
|
[[!format make """ |
[[!format makefile """ |
SUBST_CLASSES+= makefile |
SUBST_CLASSES+= makefile |
SUBST_STAGE.makefile= pre-build |
SUBST_STAGE.makefile= pre-build |
SUBST_MESSAGE.makefile= Fixing makefile |
SUBST_MESSAGE.makefile= Fixing makefile |
Line 606 asking nicely for commit access.
|
Line 606 asking nicely for commit access.
|
You can create port options with the `options.mk` file, like for `wm/dwm` |
You can create port options with the `options.mk` file, like for `wm/dwm` |
|
|
|
|
[[!format make """ |
[[!format makefile """ |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
# [[!paste id=rcsid1]][[!paste id=rcsid2]] |
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.dwm |
PKG_OPTIONS_VAR= PKG_OPTIONS.dwm |
Line 754 earlier like this:
|
Line 754 earlier like this:
|
|
|
pkgsrc supports fetching archives from specific git commits on |
pkgsrc supports fetching archives from specific git commits on |
GitHub like this: |
GitHub like this: |
[[!format make """ |
[[!format makefile """ |
PKGNAME= 2bwm-0.1 |
PKGNAME= 2bwm-0.1 |
CATEGORIES= wm |
CATEGORIES= wm |
GHCOMMIT= 52a097ca644eb571b22a135951c945fcca57a25c |
GHCOMMIT= 52a097ca644eb571b22a135951c945fcca57a25c |
Line 773 You can do all Makefile operations direc
|
Line 773 You can do all Makefile operations direc
|
like this: |
like this: |
|
|
|
|
[[!format make """ |
[[!format makefile """ |
post-extract: |
post-extract: |
${CHMOD} a-x ${WRKSRC}/elementary/apps/48/internet-mail.svg |
${CHMOD} a-x ${WRKSRC}/elementary/apps/48/internet-mail.svg |
|
|
Line 785 do-install:
|
Line 785 do-install:
|
To install, but you can also build programs from the Makefile. This |
To install, but you can also build programs from the Makefile. This |
is what qt4-sqlite3 uses: |
is what qt4-sqlite3 uses: |
|
|
[[!format make """ |
[[!format makefile """ |
do-build: |
do-build: |
cd ${WRKSRC}/src/tools/bootstrap && env ${MAKE_ENV} ${GMAKE} |
cd ${WRKSRC}/src/tools/bootstrap && env ${MAKE_ENV} ${GMAKE} |
cd ${WRKSRC}/src/tools/moc && env ${MAKE_ENV} ${GMAKE} |
cd ${WRKSRC}/src/tools/moc && env ${MAKE_ENV} ${GMAKE} |