<build>
    <package>
        <name>hplip-plugin</name>
        <version>3.19.5</version>
        <archName>N/A</archName>
        <fedoraName>N/A</fedoraName>
        <description>Binary plugin for HPs hplip printer driver library.</description>
        <download>
            <file>
                <name>hplip-3.19.5-plugin.run</name>
                <sha512sum>8c933f175bf0b91a8f30d6b362f8a487a964dd3304c859d78c9505357088047fdcacb99230f8696071269d5950f681adc0e4051617f1051be254fd6bed704cb9</sha512sum>
                <size>11516444</size>
                <location>https://developers.hp.com/sites/default/files</location>
            </file>
        </download>
        <dependency>
            <required>hplip</required>
            <required>systemd</required>
        </dependency>
        <installation>
            <command>sh ../hplip-3.19.5-plugin.run --target . --noexec --nox11</command>
            <command user="root">install -d /usr/share/hplip/data/firmware</command>
            <command user="root">install -d /usr/share/hplip/fax/plugins</command>
            <command user="root">install -d /usr/share/hplip/prnt/plugins</command>
            <command user="root">install -d /usr/share/hplip/scan/plugins</command>
            <command user="root">install -d /usr/share/licenses/hplip-plugin</command>
            <command user="root">install -d /var/lib/hp</command>
            <command user="root">install -m644 plugin.spec /usr/share/hplip/</command>
            <command user="root">install -m644 hp_laserjet_*.fw.gz /usr/share/hplip/data/firmware/</command>
            <command user="root">install -m755 fax_marvell-x86_64.so /usr/share/hplip/fax/plugins/</command>
            <command user="root">install -m755 hbpl1-x86_64.so /usr/share/hplip/prnt/plugins/</command>
            <command user="root">install -m755 lj-x86_64.so /usr/share/hplip/prnt/plugins/</command>
            <command user="root">install -m755 bb_*-x86_64.so /usr/share/hplip/scan/plugins/</command>
            <command user="root">cat &gt; /var/lib/hp/hplip.state &lt;&lt; "EOF"
[plugin]
installed = 1
eula = 1
version = 3.19.5
EOF</command>

            <command user="root">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</command>
        </installation>
    </package>
</build>
