projects
/
projects.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
afd8114
)
mebil
author
MEBIL
<mebil@mebil.(none)>
Mon, 9 Jan 2017 20:28:51 +0000
(21:28 +0100)
committer
MEBIL
<mebil@mebil.(none)>
Mon, 9 Jan 2017 20:28:51 +0000
(21:28 +0100)
tools/cpan2deb
patch
|
blob
|
history
tools/make/configure
patch
|
blob
|
history
diff --git
a/tools/cpan2deb
b/tools/cpan2deb
index
3fb1c47
..
280e9e4
100755
(executable)
--- a/
tools/cpan2deb
+++ b/
tools/cpan2deb
@@
-16,33
+16,29
@@
if [ -d build ]; then
rm -rf build
fi
rm -rf build
fi
+echo "call CPAN ..."
cpan -m $1 1>cpan.out 2>&1 || (echo "cpan failed"; exit 1)
cpan -m $1 1>cpan.out 2>&1 || (echo "cpan failed"; exit 1)
-builddir=$(ls -rt ~/.cpan/build |tail -1)
-cd ~/.cpan/build/$builddir
-perl Makefile.PL PREFIX="~/locallib"
+
+# find build directory
+mname=$1
+name=lib${mname/::/-}-perl
+name=${name,,*}
+#builddir_prefix=${mname/::/-}
+builddir=$(ls -rtd ~/.cpan/build/*/ |tail -1)
+
+cd $builddir
+perl Makefile.PL INSTALL_BASE="~/locallib"
make
make install 1>~/cpan.out 2>&1
echo "Module $1 installed to ~/locallib, output written to cpan.out"
cd
make
make install 1>~/cpan.out 2>&1
echo "Module $1 installed to ~/locallib, output written to cpan.out"
cd
-mkdir build
-
-# build copy file
-#grep "^Installing" cpan.out |sed "s/Installing //" >build/cpan.tmp
+# check version
+version=$(perl -M$mname -e 'print $ARGV[0]->VERSION' $mname)
+mkdir build
cd build
cd build
-# edit copy file
-#awk '{FS="/";} \
-#/lib/ {print $0" $1/usr/share/perl5";} \
-#/man/ {print $0" $1/usr/share/man";}' cpan.tmp >cpan.cp
-
-# build package name
-version=$(perl -M$1 -e 'print $ARGV[0]->VERSION' $1)
-mname=$1
-name=lib${mname/::/-}-perl
-name=${name,,*}
-
mkdir -p $name/DEBIAN
cat << EOF >$name/DEBIAN/control
Package: $name
mkdir -p $name/DEBIAN
cat << EOF >$name/DEBIAN/control
Package: $name
diff --git
a/tools/make/configure
b/tools/make/configure
index
32b2558
..
e9770fa
100755
(executable)
--- a/
tools/make/configure
+++ b/
tools/make/configure
@@
-88,13
+88,14
@@
then
fi
# copy package control
fi
# copy package control
-control=$(find src -name $paket.control)
+control=$(find -L src -name $paket.control)
+build_number=${build#*_}
if [ -z "$control" ]
then
echo "warning: control file not found"
echo " this file is necessary for any package production."
else
if [ -z "$control" ]
then
echo "warning: control file not found"
echo " this file is necessary for any package production."
else
- sed "s/%BUILD%/$build/" $control |sed "s/%ARCH%/$ARCH/" >$paket.control
+ sed "s/%BUILD%/$build
_number
/" $control |sed "s/%ARCH%/$ARCH/" >$paket.control
echo "$paket.control written."
# extract version
echo "$paket.control written."
# extract version
@@
-102,7
+103,7
@@
else
fi
# check for copy file
fi
# check for copy file
-copy=$(find src -name $paket.cp)
+copy=$(find
-L
src -name $paket.cp)
if [ -n "$copy" ]
then
ln -sf $copy .
if [ -n "$copy" ]
then
ln -sf $copy .
@@
-112,7
+113,7
@@
else
fi
# check for postinst
fi
# check for postinst
-postinst=$(find src -name $paket.postinst)
+postinst=$(find
-L
src -name $paket.postinst)
if [ -n "$postinst" ]
then
ln -sf $postinst .
if [ -n "$postinst" ]
then
ln -sf $postinst .