LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2024, 03:24 PM   #1
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 160

Rep: Reputation: Disabled
Question Is there a way installpkg to skip first directory in package ?


Hello everyone,

I'm compile and create the tgz package file with: cmake --build . --target package and the file structure inside the tgz package file is:

rocm-core-6.0.2.60002-Linux -> opt -> rocm-6.0.2 -> other_sub_dirs

My question is: Is there a easy way without to extract and repack again to tell on the installpkg to skip the first dir ? Or some other way to convert the package without manual to decompress and recreate again. Something like patch -p1

Or may be some how to tell on cmake to skip the first dir. I don't have much experience with cmake

Thanks in advice

Last edited by gildbg; 04-04-2024 at 03:37 PM.
 
Old 04-04-2024, 04:14 PM   #2
HQuest
Member
 
Registered: Jan 2018
Location: 2001:470:c2d0::/56
Distribution: Anything I can interface with
Posts: 92

Rep: Reputation: Disabled
Just "cd rocm-core-6.0.2.60002-Linux" before you build your package, and opt/ will be in the top folder when installed.
 
Old 04-04-2024, 11:02 PM   #3
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 160

Original Poster
Rep: Reputation: Disabled
The package is build automatic when this command is start: cmake --build . --target package
I still can't find a way to interfere with this process.
 
Old 04-05-2024, 12:58 AM   #4
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 978

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by gildbg View Post
The package is build automatic when this command is start: cmake --build . --target package
I still can't find a way to interfere with this process.
That way to create a Slackware package is simply wrong. You should use makepkg to create Slackware packages. I can't say for sure if your current package is useful for anything, but if it is, as others have suggested, you should repackage it the proper way:

Code:
cd /tmp
su
tar -xvf my_broken_package.tgz
cd rocm-core-6.0.2.60002-Linux
makepkg ../rocm-core-6.0.2-x86_64-custom1.tgz
Also, when a package put something below /opt, you most likely also want that package to put something in /etc/profile.d to set up paths and possibly also other environment variables for you package to become useful.

regards Henrik

Last edited by henca; 04-05-2024 at 01:01 AM. Reason: Also mentioning /etc/profile.d
 
1 members found this post helpful.
Old 04-05-2024, 07:27 AM   #5
gildbg
Member
 
Registered: Aug 2017
Distribution: Slackware, OpenBSD
Posts: 160

Original Poster
Rep: Reputation: Disabled
Yes,
this is what I do now, but I hope to interfere some how into the process when I run cmake --build . --target package and building of Slackware package to happen automatically.
Unfortunately, I don't have much experience with cmake and his scripts
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
installpkg: package does not end in .tgz? chike Slackware 16 05-22-2007 12:40 AM
Is there any way to display the full name of package via dpkg -l <package pattern> ? davidas Debian 4 04-07-2004 10:00 PM
Package for 'installpkg,removepkg,makepkg," bongski55 Slackware 4 09-15-2003 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration