Package sources checked into git.centos.org are in exploded SRPM format. This means that the package working directory should have at least a SPECS/ subdirectory.

New Package (from source)

To work on a package that is not already checked into git.centos.org from upstream sources:

# Let's start on a package called new-package by creating the rpm structure
[bstinson@localhost]$ mkdir -p ~/src/rpms/new-package/{SOURCES,SPECS}

[bstinson@localhost]$ cd ~/src/rpms/new-package/

# Write your spec file. Starting from scratch is ok, but rpmdevtools provides a skeleton
[bstinson@localhost new-package]$ rpmdev-newspec -o SPECS/new-package.spec

New Package (from existing SRPM)

To work on a package that is not already checked into git.centos.org from an existing Source RPM:

# Let's import new-package-1.0.1-2.el7 from a source RPM into an empty workspace
[bstinson@localhost new-package]$ rpm --define "%_topdir `pwd`" -Uvh ~/Downloads/new-package-1.0.1-2.el7.src.rpm

SIGGuide/Content/Import (last edited 2016-05-03 14:11:08 by BrianStinson)