Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aix-pm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
aix-pm
Commits
d72b4304
Commit
d72b4304
authored
2 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
debian package building (or hacking)
parent
a460867f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
build_deb.sh
+12
-0
12 additions, 0 deletions
build_deb.sh
debian/control
+14
-0
14 additions, 0 deletions
debian/control
debian/debian-binary
+1
-0
1 addition, 0 deletions
debian/debian-binary
scripts/mkdeb.pl
+66
-6
66 additions, 6 deletions
scripts/mkdeb.pl
with
93 additions
and
6 deletions
build_deb.sh
0 → 100755
+
12
−
0
View file @
d72b4304
#!/bin/sh
echo
'increment the version number, when necessary!'
epoch
=
0
version
=
0.1-1
pkgdir
=
tmp/stage/libgg-aix-pm-perl/
$epoch
/
$version
scripts/pmlnk.pm
--copy
--target
$pkgdir
/data/usr/share/perl5
.
mkdir
$pkgdir
/control
cp
debian/control
$pkgdir
/control
cp
debian/debian-binary
$pkgdir
scripts/mkdeb.pl
$pkgdir
This diff is collapsed.
Click to expand it.
debian/control
0 → 100644
+
14
−
0
View file @
d72b4304
Package: libgg-aix-pm-perl
Version: 0.1-1
Architecture: all
Maintainer: Gerhard Gonter <ggonter@gmail.com>
Original-Maintainer: Gerhard Gonter <ggonter@gmail.com>
Installed-Size: 629
Depends: perl
Section: perl
Priority: optional
Homepage: http://aix-pm.sourceforge.net/
Description: Perl modules from the aix-pm collection
The AIX:: name space plus more. Perl modules that deal with AIX specific
issues. A slowly evolving EMC CLARiiON monitoring tool belongs to the
"plus more" part.
This diff is collapsed.
Click to expand it.
debian/debian-binary
0 → 100644
+
1
−
0
View file @
d72b4304
2.0
This diff is collapsed.
Click to expand it.
scripts/mkdeb.pl
+
66
−
6
View file @
d72b4304
...
...
@@ -2,6 +2,9 @@
use
strict
;
use
Data::
Dumper
;
$
Data::Dumper::
Indent
=
1
;
my
$pkg_base
=
$ENV
{
PKGBASE
}
||
'
~/tmp/pkg
';
while
(
my
$arg
=
shift
(
@ARGV
))
...
...
@@ -36,17 +39,26 @@ sub mk_package
my
$pkg_name
=
shift
;
my
$pkg_epoch
=
shift
;
my
$pkg_version
=
shift
;
my
$deb
=
'
../../../
'
.
$pkg_name
.
'
-
';
$deb
.=
$pkg_epoch
.
'
:
'
if
(
$pkg_epoch
>
0
);
$deb
.=
$pkg_version
.
'
.deb
';
print
__LINE__
,
"
deb=[
$deb
]
\n
";
my
$pkg_arch
=
shift
;
chdir
(
$base
)
or
die
"
base not found [
$base
]
";
chdir
(
$pkg_name
)
or
die
"
pkg_name not found [
$pkg_name
]
";
chdir
(
$pkg_epoch
)
or
die
"
pkg_epoch not found [
$pkg_epoch
]
";
chdir
(
$pkg_version
)
or
die
"
pkg_version not found [
$pkg_version
]
";
my
$ctrl
=
Debian::Package::
Control
->
read_control_file
('
control/control
');
print
__LINE__
,
"
ctrl:
",
Dumper
(
$ctrl
);
unless
(
defined
(
$pkg_arch
))
{
$pkg_arch
=
$ctrl
->
{
fields
}
->
{
Architecture
}
->
{
value
}
||
'
all
';
}
my
$deb
=
'
../../../
'
.
$pkg_name
.
'
_
';
# my $deb= $pkg_name . '-';
$deb
.=
$pkg_epoch
.
'
:
'
if
(
$pkg_epoch
>
0
);
$deb
.=
$pkg_version
.
'
_
'
.
$pkg_arch
.
'
.deb
';
print
__LINE__
,
"
deb=[
$deb
]
\n
";
# mk_md5sums();
unlink
('
control.tar.xz
');
unlink
('
data.tar.xz
');
...
...
@@ -57,7 +69,8 @@ sub mk_package
cmd
(
qw(xz -zv control.tar data.tar)
);
# the ar file must contain these fils in this order
# the ar file must contain these fils in this order and should be wiped before
unlink
(
$deb
);
cmd
('
ar
',
'
rcSv
',
$deb
,
'
debian-binary
');
cmd
('
ar
',
'
rcSv
',
$deb
,
'
control.tar.xz
');
cmd
('
ar
',
'
rcSv
',
$deb
,
'
data.tar.xz
');
...
...
@@ -78,3 +91,50 @@ sub mk_md5sums
# chdir('..');
}
package
Debian::Package::
Control
;
sub
read_control_file
{
my
$class
=
shift
;
my
$fnm
=
shift
;
open
(
FI
,
'
<:utf8
',
$fnm
)
or
die
"
can't read control file [
$fnm
]
";
my
@segments
;
my
$segment
;
my
%fields
;
while
(
<
FI
>
)
{
chop
;
print
__LINE__
,
"
l=[
$_
] segment=[
$segment
]
\n
";
if
(
$_
=~
m/^#/
)
{
if
(
defined
(
$segment
)
&&
$segment
->
{
type
}
eq
'
comment
')
{
push
(
@
{
$segment
->
{
lines
}}
=>
$_
);
}
else
{
$segment
=
{
type
=>
'
comment
',
lines
=>
[
$_
]
};
push
(
@segments
,
$segment
);
}
}
elsif
(
$_
=~
m#^ #
)
{
die
'
invalid continuation
'
unless
(
defined
(
$segment
));
push
(
@
{
$segment
->
{
lines
}}
=>
$_
);
}
elsif
(
$_
=~
m#^([A-Z][\w\-_]+): *(.+)#
)
{
my
(
$field
,
$value
)
=
(
$
1
,
$
2
);
print
__LINE__
,
"
field=[
$field
] value=[
$value
]
\n
";
$segment
=
{
type
=>
'
field
',
field
=>
$field
,
value
=>
$value
,
lines
=>
[
$_
]
};
push
(
@segments
,
$segment
);
$fields
{
$field
}
=
$segment
;
}
}
close
(
FI
);
my
$res
=
{
fields
=>
\
%fields
,
segments
=>
\
@segments
};
bless
(
$res
,
$class
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment