3 # This is make+. Make+ is a set of scripts which enhance GNU make and
4 # let ou build RPMs, and other packages types with just one control
5 # file. Read more at http://www.annexia.org/freeware/makeplus/
7 # The original author is Richard W.M. Jones <rich@annexia.org>.
9 # This software has been explicitly placed in the PUBLIC DOMAIN. You
10 # do not need any sort of license or agreement to use or copy this
11 # software. You may also copyright this software yourself, and/or
12 # relicense it under any terms you want, at any time and at no cost.
13 # This allows you (among other things) to include this software with
14 # other packages so that the user does not need to download and
15 # install make+ separately.
19 # Check that either MAKEPLUS_HOME or /etc/make+.conf exists, and run it.
20 if [ "x$MAKEPLUS_HOME" = "x" ]; then
21 for d in /etc /usr/etc /usr/local/etc; do
22 if [ -f $d/make+.conf ]; then
29 # Overwrite 'configure' with the latest version. This file is never
30 # important, even in autoconf-based installations.
31 cp $MAKEPLUS_HOME/configure .
34 # Check 'Makefile+' does not exist in the current directory.
35 if [ -f "Makefile+" ]; then
36 echo "There is already a file 'Makefile+' in the current directory."
37 echo "I won't overwrite this file. Remove this file and rerun me."
41 # Get the name of the package.
42 echo -n "What is the name of your package? "
45 # Get the version number.
47 echo "Now I'm going to ask you for the initial version number for this"
48 echo "package. Version numbers have two parts: the MAJOR part and the"
51 echo "The MAJOR part is a single number (eg 3). It is used (for example)"
52 echo "for versioning libraries."
54 echo "The MINOR part is two numbers separated by a single DOT (eg 1.0)"
55 echo "This is the incremental release of the library."
57 echo "If you library is version 3.1.0 then the MAJOR part would be"
59 echo "and the MINOR part would be"
63 echo -n "What is the MAJOR part of the version? "
66 echo -n "What is the MINOR part of the version? "
69 # Create the Makefile+ file.
74 # This is a make+ file. Make+ is a set of scripts which enhance GNU
75 # make and let you build RPMs, and other package types with just one
76 # control file. To build this package you will need to download make+
77 # from this site: http://www.annexia.org/freeware/makeplus/
80 VERSION_MAJOR := $VERSION_MAJOR
81 VERSION_MINOR := $VERSION_MINOR
82 VERSION := \$(VERSION_MAJOR).\$(VERSION_MINOR)
84 SUMMARY := XXX A ONE LINE SUMMARY OF YOUR PACKAGE
85 COPYRIGHT := XXX ONE LINE COPYRIGHT OR LICENSE
86 AUTHOR := XXX YOUR NAME AND EMAIL ADDRESS
89 XXX A FEW PARAGRAPHS ABOUT WHAT YOUR PACKAGE DOES
93 RPM_GROUP := Development/Libraries
95 CFLAGS += -Wall -Werror -g -O2
99 # XXX MODIFY THE FOLLOWING TO CONFIGURE YOUR PACKAGE
101 \$(MP_CONFIGURE_START)
102 \$(MP_CHECK_HEADERS) string.h unistd.h
106 # XXX ADD CODE HERE TO BUILD YOUR PACKAGE
108 test: XXX LIST OF TEST PROGRAMS
111 # XXX MODIFY THE FOLLOWING CODE TO INSTALL YOUR PACKAGE
112 # XXX ALWAYS REMEMBER TO PREFIX INSTALLATION PATHS WITH \$(DESTDIR)
114 install -d \$(DESTDIR)\$(bindir)
115 install -m 0755 my_program \$(DESTDIR)\$(bindir)
119 XXX PUT YOUR WEBSITE HERE. IF YOU DON\'T WANT TO MANAGE A WEBSITE WITH
120 XXX MAKE+ THEN JUST DELETE THIS SECTION AND THE upload_website RULE.
125 scp \$(PACKAGE)-\$(VERSION).tar.gz \$(PACKAGE)-\$(VERSION)-1.*.rpm \\
126 \$(PACKAGE)-\$(VERSION).bin.tar.gz \\
127 you@yourmachine.example.com:/var/www/html/\$(PACKAGE)/files
128 scp index.html you@yourmachine.example.com:/var/www/html/\$(PACKAGE)/
130 .PHONY: build configure test upload_website
134 echo "I've written a Makefile+ file for you. You'll need to edit this file."
135 echo "Start by searching for all the 'XXX's and replacing them as necessary."