Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Create makefile package

    Development
    2
    5
    641
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      andresense
      last edited by

      Hello,

      I am creating a custom package for pfSense, but I got stuck in building makefile. Could you help me with a good reference on how to build makefile?

      Note: The only reference I found was but it didn't help much.

      https://docs.netgate.com/pfsense/en/latest/development/package-port-directory-structure.html

      1 Reply Last reply Reply Quote 0
      • bmeeksB
        bmeeks
        last edited by bmeeks

        Take a look at some real life example Makefiles here: https://github.com/pfsense/FreeBSD-ports/tree/devel/securitylink text. Scroll down until you find a series of directories beginning with the string pfSense-pkg-*. Those are pfSense GUI packages. Browse some of those directories and examine the content and how the files and directory are arranged. The Makefile is in the root of each package directory. You can look through it to see how it works.

        There is no step-by-step guide anywhere that I'm aware of. I think most of us that built packages for pfSense learned by doing and by using another package as an example to build from.

        1 Reply Last reply Reply Quote 1
        • A
          andresense
          last edited by

          Thanks I'll take a look at this.

          1 Reply Last reply Reply Quote 0
          • A
            andresense
            last edited by

            Can you tell me where I can find references to variables like these from makefile:

            $ {WRKSRC}
            $ {INSTALL_DATA}
            $ {FILESDIR}

            bmeeksB 1 Reply Last reply Reply Quote 0
            • bmeeksB
              bmeeks @andresense
              last edited by

              @andresense said in Create makefile package:

              Can you tell me where I can find references to variables like these from makefile:

              $ {WRKSRC}
              $ {INSTALL_DATA}
              $ {FILESDIR}

              You need to research the format of FreeBSD Makefiles. Start here: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefiles.htmllink text.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.