Improved Deb generation
This commit is contained in:
parent
9ae84f5d6b
commit
7a1aa6b563
32
Makefile
32
Makefile
@ -178,28 +178,42 @@ $(MPITSTDIR)/% : test/mpi/%.cu $(TSTDEP)
|
|||||||
|
|
||||||
#### PACKAGING ####
|
#### PACKAGING ####
|
||||||
|
|
||||||
DEB_GEN_IN := $(shell ls debian/*.in)
|
DEBIANDIR := $(BUILDDIR)/debian
|
||||||
DEB_GEN := $(DEB_GEN_IN:.in=)
|
|
||||||
|
DEBGEN_IN := $(shell (cd debian ; ls *.in))
|
||||||
|
DEBGEN := $(DEBGEN_IN:.in=)
|
||||||
|
DEBFILES := compat copyright libnccl-dev.install libnccl-dev.manpages nccl.7 rules $(DEBGEN)
|
||||||
|
DEBTARGETS := $(patsubst %, $(DEBIANDIR)/%, $(DEBFILES))
|
||||||
|
|
||||||
DEB_REVISION ?= 1
|
DEB_REVISION ?= 1
|
||||||
DEB_TIMESTAMP := $(shell date -R)
|
DEB_TIMESTAMP := $(shell date -R)
|
||||||
|
DEB_ARCH ?= amd64
|
||||||
|
|
||||||
deb : lib $(DEB_GEN)
|
debian : $(DEBTARGETS)
|
||||||
|
|
||||||
|
deb : lib debian
|
||||||
@printf "Building Debian package\n"
|
@printf "Building Debian package\n"
|
||||||
debuild -eBUILDDIR -eLD_LIBRARY_PATH -uc -us -d -b
|
(cd $(BUILDDIR); debuild -eLD_LIBRARY_PATH -uc -us -d -b)
|
||||||
mkdir -p $(BUILDDIR)/deb/
|
mkdir -p $(BUILDDIR)/deb/
|
||||||
mv ../libnccl*.deb $(BUILDDIR)/deb/
|
mv $(BUILDDIR)/../libnccl*.deb $(BUILDDIR)/deb/
|
||||||
|
|
||||||
debclean :
|
debclean :
|
||||||
rm -f $(DEB_GEN)
|
rm -Rf $(DEBIANDIR)
|
||||||
|
|
||||||
debian/% : debian/%.in
|
$(DEBIANDIR)/% : debian/%.in
|
||||||
@printf "Generating %-25s > %-24s\n" $< $@
|
@printf "Generating %-25s > %-24s\n" $< $@
|
||||||
sed -e "s/\$${nccl:Major}/$(NCCL_MAJOR)/g" \
|
sed -e "s/\$${nccl:Major}/$(NCCL_MAJOR)/g" \
|
||||||
-e "s/\$${nccl:Minor}/$(NCCL_MINOR)/g" \
|
-e "s/\$${nccl:Minor}/$(NCCL_MINOR)/g" \
|
||||||
-e "s/\$${nccl:Patch}/$(NCCL_PATCH)/g" \
|
-e "s/\$${nccl:Patch}/$(NCCL_PATCH)/g" \
|
||||||
-e "s/\$${cuda:Major}/$(CUDA_MAJOR)/g" \
|
-e "s/\$${cuda:Major}/$(CUDA_MAJOR)/g" \
|
||||||
-e "s/\$${cuda:Minor}/$(CUDA_MINOR)/g" \
|
-e "s/\$${cuda:Minor}/$(CUDA_MINOR)/g" \
|
||||||
-e "s/\$${nccl:Debian}/$(DEB_REVISION)/g" \
|
-e "s/\$${deb:Revision}/$(DEB_REVISION)/g" \
|
||||||
-e "s/\$${nccl:Timestamp}/$(DEB_TIMESTAMP)/g" \
|
-e "s/\$${deb:Timestamp}/$(DEB_TIMESTAMP)/g" \
|
||||||
|
-e "s/\$${deb:Arch}/$(DEB_ARCH)/g" \
|
||||||
$< > $@
|
$< > $@
|
||||||
|
|
||||||
|
$(DEBIANDIR)/% : debian/%
|
||||||
|
@printf "Grabbing %-25s > %-25s\n" $< $@
|
||||||
|
mkdir -p $(DEBIANDIR)
|
||||||
|
cp -f $< $@
|
||||||
|
|
||||||
|
4
debian/changelog.in
vendored
4
debian/changelog.in
vendored
@ -1,5 +1,5 @@
|
|||||||
nccl (${nccl:Major}.${nccl:Minor}.${nccl:Patch}-${nccl:Debian}+cuda${cuda:Major}.${cuda:Minor}) trusty; urgency=medium
|
nccl (${nccl:Major}.${nccl:Minor}.${nccl:Patch}-${deb:Revision}+cuda${cuda:Major}.${cuda:Minor}) trusty; urgency=medium
|
||||||
|
|
||||||
* Automatic Debian package from build
|
* Automatic Debian package from build
|
||||||
|
|
||||||
-- cudatools <cudatools@nvidia.com> ${nccl:Timestamp}
|
-- cudatools <cudatools@nvidia.com> ${deb:Timestamp}
|
||||||
|
4
debian/control.in
vendored
4
debian/control.in
vendored
@ -7,7 +7,7 @@ Standards-Version: 3.9.5
|
|||||||
|
|
||||||
Package: libnccl${nccl:Major}
|
Package: libnccl${nccl:Major}
|
||||||
Section: libs
|
Section: libs
|
||||||
Architecture: amd64
|
Architecture: ${deb:Arch}
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
Description: NVIDIA Collectives Communication Library (NCCL) Runtime
|
Description: NVIDIA Collectives Communication Library (NCCL) Runtime
|
||||||
NCCL (pronounced "Nickel") is a stand-alone library of standard collective
|
NCCL (pronounced "Nickel") is a stand-alone library of standard collective
|
||||||
@ -18,7 +18,7 @@ Description: NVIDIA Collectives Communication Library (NCCL) Runtime
|
|||||||
|
|
||||||
Package: libnccl-dev
|
Package: libnccl-dev
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Architecture: amd64
|
Architecture: ${deb:Arch}
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}, libnccl${nccl:Major} (= ${binary:Version})
|
Depends: ${misc:Depends}, ${shlibs:Depends}, libnccl${nccl:Major} (= ${binary:Version})
|
||||||
Description: NVIDIA Collectives Communication Library (NCCL) Development Files
|
Description: NVIDIA Collectives Communication Library (NCCL) Development Files
|
||||||
NCCL (pronounced "Nickel") is a stand-alone library of standard collective
|
NCCL (pronounced "Nickel") is a stand-alone library of standard collective
|
||||||
|
Loading…
x
Reference in New Issue
Block a user