Re: Creating Spec file for RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 23/11/2017 19:24, Joseph L. Casale wrote:
> -----Original Message-----
> From: CentOS [mailto:centos-bounces@xxxxxxxxxx] On Behalf Of Andrew W
> Sent: Thursday, November 23, 2017 10:39 AM
> To: centos@xxxxxxxxxx
> Subject:  Creating Spec file for RPM
>  
>> Im trying to learn how to create RPMs but am a little confused by the
>> spec file.
>>
>> Im trying to package up some Python scripts, rather than binary files,
>> and I want them to be installed in a subdirectory under /usr/local which
>> I shall refer to as /usr/local/X
>>
>> Ive put the scripts in a tarball under /home/me/X/RPM/SOURCES
> 
> You are using rpm-build and not building as root, right?
> 
>> but Im getting terribly confused over what to put in the  %build
>> %install and %files sections
>>
>>
>> If I set $RPM_BUILD_ROOT to /home/me/X/RPM/temp then put
>>
>> %prep
>>
>> %setup -q
>>
>> that will unpack the tarball, yes?, but where to, /home/me/X/RPM/temp ?
>>
>> how would I then tell it to move the files I want from there into
>> /usr/local/X and set appropriate permissions on them? The examples
>> online all assume you have a makefile with a make install target, could
>> I simply use the cp command under the %install section? But where am I
>> copying from and to?
> 

No special permissions.
Use 'rpmbuild' tool that works in a dedicated directory in your home.

See https://wiki.centos.org/HowTos/SetupRpmBuildEnvironment

-- 
---
Antonio Trande
Fedora Project
mailto 'sagitter at fedoraproject dot org'
GPG key: 0x5E212EE1D35568BE
GPG key server: https://keys.fedoraproject.org/
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux