Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-03-2024, 10:16 AM
|
#31
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
Sorry NevemTeve, second to last before this I wrote was at TB0ne. X E.
|
|
|
06-03-2024, 10:20 AM
|
#32
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep:
|
Many deb helper tools are listed on https://wiki.debian.org/AutomaticPackagingTools.
Of those, I have experience with dh-make (but prefer debmake over it), dh-make-perl aka cpan2dsc (OK), gem2deb (OK), python3-stdeb aka py2dsc (crap), pypi2deb aka py2dsp (OK, but you'll have to backport the version currently in sid to be able to handle Python projects based around pyproject.toml), and npm2deb (very good).
I also have had some experience with debcargo and cabal-debian, but that was several years ago, I haven't tried their recent versions as I didn't have to make debs out of any Rust or Haskell projects recently.
|
|
1 members found this post helpful.
|
06-03-2024, 10:23 AM
|
#33
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
Quote:
Originally Posted by shruggy
Many deb helper tools are listed on https://wiki.debian.org/AutomaticPackagingTools.
Of those, I have experience with dh-make (but prefer debmake over it), dh-make-perl aka cpan2dsc (OK), gem2deb (OK), python3-stdeb aka py2dsc (crap), pypi2deb aka py2dsp (OK, but you'll have to backport the version currently in sid to be able to handle Python projects based around pyproject.toml), and npm2deb (very good).
I also have had some experience with debcargo and cabal-debian, but that was several years ago, I haven't tried their recent versions as I didn't have to make debs out of any Rust or Haskell projects recently.
|
Wow, so can I make an app in Ruby or Java since I know those? Sorry but I am still unclear how some. I understand directory structure and stuff but how do I know how to connect in stuff? Are there API refs? X E.
|
|
|
06-03-2024, 10:34 AM
|
#34
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
Okay, I saw lots of stuff for making apps but what exactly do I need to install or get to make an app? Looks like Ruby is for me now. Java no auto maker seemingly according to that. Looks like I need to make an archive of like my files and it makes a template for me. I looked through lots of official documents. Thank you. I know I could make a gem but I would like to make just a program, no gem needed. Where would be getting started with say auto tools? X E.
|
|
|
06-03-2024, 10:53 AM
|
#35
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,316
|
I think we need to review some things here, because I’m not 100 percent sure if you know them.
An “app” is a single file with execute permissions. If the language used to make that app is interpreted, then the app would be a text file, containing the source code, and starting with a shebang. If the language is compiled, then the app would generated by running the source code file through a program called a compiler.
The source code is what you write.
To distribute the app to your friend, then all you need to do is test it on his version of Linux, and give him the executable. He can then just run it.
Some apps load other files. And if you’re distributing it for a general audience, then you’ll want to include things like icons and .desktop files (to put it in the menus). A packaging format like .deb just bundles all that together, and installing the .deb puts those files in the right place for the distribution to find them.
It sounds like you’re trying to find out how to make a .deb when you don’t even know how to compile, and that’s not going to work.
|
|
1 members found this post helpful.
|
06-03-2024, 10:55 AM
|
#36
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
I know how to compile, interpret, whatever. What I try for is something I can install and use hardware with, preferably with minimal other installations. I already make cross platform stuff but what I am trying for is like a system app or whatever to call it. X E.
Last edited by maybeJosiah; 06-03-2024 at 10:58 AM.
|
|
|
06-03-2024, 10:57 AM
|
#37
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,316
|
Okay, so what are you actually asking here?
|
|
|
06-03-2024, 10:58 AM
|
#38
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
How do I make an installable thing like a .deb?
|
|
|
06-03-2024, 11:01 AM
|
#39
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
Like how to make a stand alone compiled for Linux thing that can use system stuff and have GUI? At this point I think I am asking how to make a .deb with Ruby. X E.
|
|
|
06-03-2024, 11:01 AM
|
#40
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep:
|
For Java, they have javahelper.
Quote:
Originally Posted by maybeJosiah
I know I could make a gem but I would like to make just a program, no gem needed.
|
Then those tools are not for you. They are called auto because they semi-automatically convert some language projects to deb. I.e. if you have a Ruby gem, you can semi-automatically convert it to deb with gem2deb; if you have a Perl module packaged on CPAN, you can semi-automatically convert it to deb with cpan2dsc, and so on.
But if you just have a program in some language, with no packaging infrastructure, you'll have to package it manually. debmake may help to start you going, but it will still require quite a few manual (and often menial) work on your part. How to use debmake is exhaustively described in the Guide for Debian Maintainers. This will require some learning curve, for sure.
Are there shortcuts, you ask? Yes, there are. But I don't like them. E.g., there is makedeb. It's especially appealing for those who accustomed to creating PKGBUILDs for Arch/AUR as it basically uses the same paradigm. In my experience, it's less flexible than native Debian tools, but it may help you quickly create a simple deb package from scratch. I doubt such a package would ever be accepted into Debian or Ubuntu though as it would not pass their packaging quality musters.
|
|
|
06-03-2024, 11:03 AM
|
#41
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,316
|
“How do I make a .deb” is easily googlable. Here’s one link.
https://www.hackgnar.com/2016/01/sim...ation.html?m=1
“How do I write the program I’m going to put into the .deb” is another question entirely.
|
|
|
06-03-2024, 11:04 AM
|
#42
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
I saw that gems are converted to tar.gz's then to .Deb's so what is wrong with just making a .tar.gz skip the gem? X E.
|
|
|
06-03-2024, 11:05 AM
|
#43
|
Member
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish X E.
Posts: 358
Original Poster
Rep:
|
Yeah, at this point it is like how do I make code actually do anything in a .deb. I can make a static .Deb but I try for a program. X E.
|
|
|
06-03-2024, 11:27 AM
|
#44
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep:
|
Quote:
Originally Posted by maybeJosiah
I saw that gems are converted to tar.gz's then to .Deb's so what is wrong with just making a .tar.gz skip the gem? X E.
|
Everything is wrong about it. A .tar.gz is just a bunch of files and directories packed together. It has no universally agreed upon internal structure¹. No automatic tool will be able to do anything with it.
______
¹ Unless we are speaking about Slackware's .tgz, which does indeed have a clearly defined internal structure and format, but this is something very different than your random .tar.gz archive.
Last edited by shruggy; 06-03-2024 at 11:33 AM.
|
|
|
06-03-2024, 11:35 AM
|
#45
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,126
|
Quote:
Originally Posted by maybeJosiah
How do I make an installable thing like a .deb? Like how to make a stand alone compiled for Linux thing that can use system stuff and have GUI? At this point I think I am asking how to make a .deb with Ruby. X E.
|
Now we're on to Ruby, from rust/python/java. Great....again, still doesn't matter and you don't seem to be grasping what you're told. AGAIN: - Write your program, whatever you want it to be, in whatever language. You claim to be an expert and can code in anything; this should be trivial.
- Get your program working with whatever you want GUI/CLI/Web/Whatever
- Put it, along with whatever you want in a directory by itself, and **FOLLOW THE EASILY FOUND HOW TO GUIDES YOU WERE SPOON FED IN POST #3** to create the .deb
You are now done. Notice that there aren't any 'it needs rust/python/ruby/whatever' qualifications. Notice how it doesn't depend on snap/flatpack/whatever-else. Install it locally; host it wherever you want. Still isn't hard, but you aren't understanding things. At this point, you're either trolling or are unable to learn.
|
|
|
All times are GMT -5. The time now is 02:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|