Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
eepm
Commits
3837b4a5
Commit
3837b4a5
authored
May 08, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add hplip-plugin
parent
36f8489a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
0 deletions
+103
-0
hplip-plugin.sh
pack.d/hplip-plugin.sh
+69
-0
hplip-plugin.sh
play.d/hplip-plugin.sh
+21
-0
hplip-plugin.sh
repack.d/hplip-plugin.sh
+13
-0
No files found.
pack.d/hplip-plugin.sh
0 → 100755
View file @
3837b4a5
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
.
$(
dirname
$0
)
/common.sh
if
!
echo
"
$TAR
"
|
grep
-q
"hplip-.*-plugin"
;
then
fatal
"No idea how to handle
$TAR
"
fi
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hplip-plugin
sh
$TAR
--target
.
--noexec
||
exit
case
"
$(
epm print info
-a
)
"
in
x86_64
)
arch
=
"x86_64"
;;
x86
)
arch
=
"x86_32"
;;
aarch64
)
arch
=
"arm64"
;;
armhf
)
arch
=
"arm32"
;;
*
)
fatal
"Unsupported arch"
;;
esac
VERSION
=
"
$(
echo
"
$TAR
"
|
sed
-e
"s|.*hplip-
\(
.*
\)
-plugin.run.*|
\1
|"
)
"
#"
mkdir
-p
usr/share/hplip/data/firmware
mkdir
-p
usr/share/hplip/fax/plugins
mkdir
-p
usr/share/hplip/prnt/plugins
mkdir
-p
usr/share/hplip/scan/plugins
mkdir
-p
usr/share/doc/hplip-plugin
mkdir
-p
var/lib/hp
install
-m644
plugin.spec usr/share/hplip/
install
-m644
hp_laserjet_
*
.fw.gz usr/share/hplip/data/firmware/
install
-m755
fax_marvell-
"
$arch
"
.so usr/share/hplip/fax/plugins/
install
-m755
hbpl1-
"
$arch
"
.so usr/share/hplip/prnt/plugins/
install
-m755
lj-
"
$arch
"
.so usr/share/hplip/prnt/plugins/
install
-m755
bb_
*
-
"
$arch
"
.so usr/share/hplip/scan/plugins/
install
-m644
license.txt usr/share/doc/hplip-plugin/
# Create hplip.state used by hplip-tools
cat
<<
EOF
> hplip.state
[plugin]
installed = 1
eula = 1
version =
$VERSION
EOF
install
-m644
hplip.state var/lib/hp/
# Create symlinks
find usr/share/hplip
-type
f
-name
"*.so"
|
while
read
f
;
do
lib_dir
=
"
${
f
%/*
}
"
lib_name
=
"
${
f
##*/
}
"
ln
-vsf
"
$lib_name
"
"
$lib_dir
/
${
lib_name
%%-*
}
.so"
done
PKGNAME
=
$PRODUCT
-
$VERSION
.tar
erc pack
$PKGNAME
usr/share/hplip usr/share/doc/hplip-plugin var/lib/hp/hplip.state
||
exit
return_tar
$PKGNAME
play.d/hplip-plugin.sh
0 → 100755
View file @
3837b4a5
#!/bin/sh
PKGNAME
=
hplip-plugin
SUPPORTEDARCHES
=
"x86_64 x86 armhf aarch64"
VERSION
=
"
$2
"
DESCRIPTION
=
'Binary plugin for HPs hplip printer driver library'
URL
=
"https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html"
.
$(
dirname
$0
)
/common.sh
epm installed hplip
||
fatal
"hplip package is not installed"
# for current hplip package
if
[
"
$VERSION
"
=
"*"
]
;
then
VERSION
=
"
$(
epm print version
for
package hplip
)
"
fi
# https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-$VERSION-plugin.run
PKGURL
=
"https://developers.hp.com/sites/default/files/hplip-
$VERSION
-plugin.run"
epm pack
--install
$PKGNAME
$PKGURL
repack.d/hplip-plugin.sh
0 → 100755
View file @
3837b4a5
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
.
$(
dirname
$0
)
/common.sh
subst
'1iAutoReq:no'
$SPEC
subst
'1iAutoProv:no'
$SPEC
subst
"s|^License: unknown
$|
License: Proprietary|"
$SPEC
subst
"s|^Summary:.*|Summary: Binary plugin for HPs hplip printer driver library|"
$SPEC
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment