Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613684
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:09:19+00:00 2026-05-18T22:09:19+00:00

So I have created a piece of software which I wanna package and post

  • 0

So I have created a piece of software which I wanna package and post to Arch Linux User Repositories, AUR, -should note, that I have never packaged anything for any distro before – and I have also got it packaged and installed on my own machine via Arch’s package manager Pacman successfully, but now I am wondering how on earth am I gonna structure the folders and files?

Normally when I wrote software, I use this structure:

build/ | src/ | makefile

As a minimum, and in the case of this piece of software, the makefile does nothing more than compile a .cpp file from src/ to build/.
To make the Arch package, I also had to create a .rc file, to use the program properly as a daemon and the PKGBUILD file, which is the file that tells the makepkg program how to build the installer-package – these two files, though, are specific to Arch.
If I wanna package the program for say debian, I would need another set of files to do this too, but these files only work for debian. Now, I can’t just put the .rc file and the PKGBUILD file in to the programs root folder, since that would “be a mess” especially if I also had files to build a package for debian, but where do I put the distro-specific files? I need to have it in the programs root folder -at-least- to be able to keep track of it, and my initial thought was to go with a structure like distro/arch/ for Arch Linux specific files, and then the PKGBUILD file would just run the makefile in the programs root folder and copy the compiled file from build/ to distro/arch/ before it did anything else, but I discovered that I couldnt get PKGBUILD to work that way, and people on #archlinux on Freenode also said it was not a smart idea.

So where do I put the distro specific files? If I knew I only had to provide this program for Arch, it would be easy to just structure it only for Makepkg, but I dont like to imprison the softwarelike that, and I could also imagine providing packages for other mayor distros like debian, so how do I achieve this while keeping a sane file structure?

Regards,
Chris Buchholz

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:09:20+00:00Added an answer on May 18, 2026 at 10:09 pm

    Very often you find in tarballs a directory called ‘debian’ which has the debian specific files in it. I would go the same route and create a directory ‘archlinux’ and put the files there.

    Then I would go on and put a file README in the archlinux directory that explains how to use the PKGBUILD properly.

    One solution could be to write a rule into your Makefile ‘package-arch’ that copies the PKGBUILD into the root directory, runs makepkg, then deletes the redundant PKGBUILD.

    It’s hackish, so I would also write a bug report for the Arch people to fix this limitation. However, did you try makepkg -p archlinux/PKGBUILD?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a piece of code which takes an IP address (from main
I have created a piece of software to download data from finger-scanners and write
We have a piece of software which can run on several different graphics cards,
I have a piece of software in which there is a function ie: void
I have created a custom post type named People. I have created a page
I am implementing a piece of software that works like this: I have a
We have a piece of software that attempts to print .tif images using a
I have a piece of software that has worked fine on many machines, althoughon
I have created a form based on JSON feed, when the user click on
We have a 3rd party piece of software that uses a bunch of internal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.