aboutsummaryrefslogtreecommitdiff
path: root/graphics/gimp-manual-html
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2014-04-29 12:32:25 +0000
committerPawel Pekala <pawel@FreeBSD.org>2014-04-29 12:32:25 +0000
commit2b4bbc0d84cff56c6d170c8d6e430c4c55107ea9 (patch)
tree5223ab8ff48404f02b364fb615bdc06872e6ca20 /graphics/gimp-manual-html
parent6d293e46e0bc8cd2b63ef3f48f9bca94088089d3 (diff)
downloadports-2b4bbc0d84cff56c6d170c8d6e430c4c55107ea9.tar.gz
ports-2b4bbc0d84cff56c6d170c8d6e430c4c55107ea9.zip
- Add staging support
- Convert to new options framework
Notes
Notes: svn path=/head/; revision=352593
Diffstat (limited to 'graphics/gimp-manual-html')
-rw-r--r--graphics/gimp-manual-html/Makefile69
1 files changed, 30 insertions, 39 deletions
diff --git a/graphics/gimp-manual-html/Makefile b/graphics/gimp-manual-html/Makefile
index c640b951d3fc..17faee925a1c 100644
--- a/graphics/gimp-manual-html/Makefile
+++ b/graphics/gimp-manual-html/Makefile
@@ -10,54 +10,45 @@ MASTER_SITES= http://kefk.net/Open_Source/FS/GIMP/Download/GUM/ \
PKGNAMESUFFIX= -${DOCFORMAT}
MAINTAINER= ports@FreeBSD.org
-COMMENT= The user manual for the GNU Image Manipulation Program (GIMP)
-
-NO_STAGE= yes
-.if !defined(DOCFORMAT)
-DOCFORMAT=HTML
-.else
-.if ${DOCFORMAT} != "HTML" && ${DOCFORMAT} != "PDF"
-.BEGIN:
- @${ECHO_MSG} "ERROR: invalid value for DOCFORMAT: \"${DOCFORMAT}\""
- @${ECHO_MSG} "Possible values are: HTML, PDF."
- @${FALSE}
-.endif
-.endif
-
-PLIST= ${PKGDIR}/pkg-plist_${DOCFORMAT}
-
-pre-everything::
- @${ECHO_MSG} "This manual is available in two formats: HTML and PDF."
- @${ECHO_MSG} "Note that the manual is pretty darn big."
+COMMENT= User manual for the GNU Image Manipulation Program (GIMP)
EXTRACT_ONLY= #empty
NO_BUILD= yes
+DOCDIR= ${STAGEDIR}${PREFIX}/share/doc/gimp
-.if ${DOCFORMAT} == "HTML"
-DISTFILES= GimpUsersManual_SecondEdition-HTML_Color.tar.gz \
- GimpUsersManual_SecondEdition-HTML_Search.tar.gz
+PLIST= ${PKGDIR}/pkg-plist_${DOCFORMAT}
-do-install:
- @${MKDIR} ${PREFIX}/share/doc/gimp
- for file in ${DISTFILES} ; do \
- cd ${PREFIX}/share/doc/gimp; \
- ${TAR} -zxf ${DISTDIR}/$${file}; \
- ${CHOWN} -R root:wheel ${PREFIX}/share/doc/gimp; \
- done
-.endif
+OPTIONS_SINGLE= DOCFORMAT
+OPTIONS_SINGLE_DOCFORMAT= HTML PDF
+OPTIONS_DEFAULT= HTML
-.if ${DOCFORMAT} == "PDF"
-DISTFILES= GimpUsersManual_SecondEdition-PDF_Color.pdf \
+HTML_DESC= User manual in HTML format
+HTML_DISTFILES= GimpUsersManual_SecondEdition-HTML_Color.tar.gz \
+ GimpUsersManual_SecondEdition-HTML_Search.tar.gz
+
+PDF_DESC= User manual in PDF format
+PDF_DISTFILES= GimpUsersManual_SecondEdition-PDF_Color.pdf \
GimpUsersManual_SecondEdition-PDF.pdf
-EXTRACT_ONLY= #empty
-NO_BUILD= yes
+.include <bsd.port.options.mk>
-do-install:
- @${MKDIR} ${PREFIX}/share/doc/gimp
- for file in ${DISTFILES} ; do \
- ${INSTALL_DATA} ${DISTDIR}/$${file} ${PREFIX}/share/doc/gimp/ ; \
- done
+.if ${PORT_OPTIONS:MHTML}
+DOCFORMAT= HTML
.endif
+.if ${PORT_OPTIONS:MPDF}
+DOCFORMAT= PDF
+.endif
+
+do-install:
+ @${MKDIR} ${DOCDIR}
+.for file in ${DISTFILES}
+. if ${PORT_OPTIONS:MHTML}
+ (cd ${DOCDIR} && ${TAR} -zxf ${DISTDIR}/${file})
+. endif
+. if ${PORT_OPTIONS:MPDF}
+ ${INSTALL_DATA} ${DISTDIR}/${file} ${DOCDIR}
+. endif
+.endfor
+
.include <bsd.port.mk>