web-dev-qa-db-fra.com

comment emballer mon repo git et publier sur mon tableau de bord ppa

J'ai repo GitHub nommé enregistreur. C'est une bibliothèque C++. Ce que je fais pour emballer et publier sur mon tableau de bord ppa est

cd
rm -Rf Packages2
mkdir Packages2
cp -R workspace/logger/ Packages2/logger-1.0
cd Packages2/logger-1.0
rm -R build/
rm -R debian/
rm -R dist/
rm -R nbproject/
rm -R QtBuild/
rm -Rf .git
rm Makefile.old 
rm CMakeLists.txt.user

cd ~/Packages2/logger-1.0/
make clean
cd ..
rm -Rf logger-1.0.tar.gz logger_* logger logger-dev_* liblogger1_* logger1_* build-area/logger-1.0 build-area/logger_* build-area liblogger1_* build-area/logger-dev_* build-area/logger1*

tar -czf logger-1.0.tar.gz logger-1.0
bzr dh-make logger 1.0 logger-1.0.tar.gz
ly
cd logger/debian/
rm *ex *EX
cp ~/workspace/logger/debian/control ./
cp ~/workspace/logger/debian/changelog ./
cp ~/workspace/logger/debian/copyright ./
cp ~/workspace/logger/debian/rules ./
cp ~/workspace/logger/debian/README.Debian ./
cp ~/workspace/logger/debian/README.source ./
bzr commit -m "Initial commit of Debian packaging."
bzr builddeb -- -us -uc # -sd
bzr builddeb -S -- # -sd
bzr tag release-1.1
cd ../../build-area
pbuilder-dist xenial build logger_1.0-0ubuntu1.dsc
cd ../logger
bzr Push lp:~satyagowtham-k-gmail/+junk/logger-package
cd ../build-area
dput ppa:satyagowtham-k-gmail/ferryfair.ppa logger_1.0-0ubuntu1_source.changes

Maintenant, je sais que nous pouvons utiliser git au lieu de bzr. J'ai trouvé très peu de documentation concernant le packaging et la publication dans Launchpad PPA. Comment puis-je y arriver?

2
Necktwi

Il s'avère être très simple

cd ~/workspace/logger
git tag v1.0
git checkout -b ubuntu/xenial
mkdir debian
cd debian
vi changelog
vi control
vi rules
vi liblogger-dev.dirs
vi liblogger-dev.install
vi liblogger1.dirs
vi liblogger1.install
mkdir source
vi source/format
vi compat
cd ..
git add debian
git commit -a -m "packed from git"
# Check if full build works (so we don't upload a broken source package)
gbp buildpackage --git-upstream-tag='v1.0' --git-debian-branch=ubuntu/xenial
# Build source package
debuild -S -sa
# Upload source package to ppa
dput ppa:satyagowtham-k-gmail/ferryfair.ppa ../logger_1.0-0ubuntu1_source.changes

c'est tout.

3
Necktwi