mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
dupeGuru PE now has a functional debian source package (the source package compiles extensions).
This commit is contained in:
parent
8fabb14b8b
commit
e2b23ca961
24
debian/build_pe_modules.py
vendored
Normal file
24
debian/build_pe_modules.py
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import os.path as op
|
||||||
|
import shutil
|
||||||
|
import importlib
|
||||||
|
|
||||||
|
from setuptools import setup, Extension
|
||||||
|
|
||||||
|
sys.path.insert(1, op.abspath('src'))
|
||||||
|
|
||||||
|
from hscommon.build import move_all
|
||||||
|
|
||||||
|
exts = [
|
||||||
|
Extension("_block", [op.join('modules', 'block.c'), op.join('modules', 'common.c')]),
|
||||||
|
Extension("_cache", [op.join('modules', 'cache.c'), op.join('modules', 'common.c')]),
|
||||||
|
Extension("_block_qt", [op.join('modules', 'block_qt.c')]),
|
||||||
|
]
|
||||||
|
setup(
|
||||||
|
script_args = ['build_ext', '--inplace'],
|
||||||
|
ext_modules = exts,
|
||||||
|
)
|
||||||
|
move_all('_block_qt*', op.join('src', 'qt', 'pe'))
|
||||||
|
move_all('_cache*', op.join('src', 'core_pe'))
|
||||||
|
move_all('_block*', op.join('src', 'core_pe'))
|
2
debian/control
vendored
2
debian/control
vendored
@ -2,7 +2,7 @@ Source: {pkgname}
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Virgil Dupras <hsoft@hardcoded.net>
|
Maintainer: Virgil Dupras <hsoft@hardcoded.net>
|
||||||
Build-Depends: debhelper (>= 7)
|
Build-Depends: debhelper (>= 7), python3-dev
|
||||||
Standards-Version: 3.8.1
|
Standards-Version: 3.8.1
|
||||||
Homepage: http://www.hardcoded.net
|
Homepage: http://www.hardcoded.net
|
||||||
|
|
||||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -41,6 +41,8 @@ install: build
|
|||||||
dh_prep
|
dh_prep
|
||||||
dh_installdirs
|
dh_installdirs
|
||||||
|
|
||||||
|
touch build_pe_modules.py
|
||||||
|
python3 build_pe_modules.py
|
||||||
chmod +x src/run.py
|
chmod +x src/run.py
|
||||||
cp -R src/ $(CURDIR)/debian/{pkgname}/usr/share/{execname}
|
cp -R src/ $(CURDIR)/debian/{pkgname}/usr/share/{execname}
|
||||||
cp $(CURDIR)/debian/{execname}.desktop $(CURDIR)/debian/{pkgname}/usr/share/applications
|
cp $(CURDIR)/debian/{execname}.desktop $(CURDIR)/debian/{pkgname}/usr/share/applications
|
||||||
|
@ -16,7 +16,7 @@ from argparse import ArgumentParser
|
|||||||
from hscommon.plat import ISWINDOWS, ISLINUX
|
from hscommon.plat import ISWINDOWS, ISLINUX
|
||||||
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, build_debian_changelog,
|
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, build_debian_changelog,
|
||||||
copy_qt_plugins, get_module_version, filereplace, copy, setup_package_argparser,
|
copy_qt_plugins, get_module_version, filereplace, copy, setup_package_argparser,
|
||||||
package_cocoa_app_in_dmg)
|
package_cocoa_app_in_dmg, copy_all)
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
@ -90,6 +90,11 @@ def package_debian(edition):
|
|||||||
if edition == 'me':
|
if edition == 'me':
|
||||||
packages.append('hsaudiotag')
|
packages.append('hsaudiotag')
|
||||||
copy_packages(packages, srcpath)
|
copy_packages(packages, srcpath)
|
||||||
|
if edition == 'pe':
|
||||||
|
os.mkdir(op.join(destpath, 'modules'))
|
||||||
|
copy_all(op.join('core_pe', 'modules', '*.*'), op.join(destpath, 'modules'))
|
||||||
|
copy(op.join('qt', 'pe', 'modules', 'block.c'), op.join(destpath, 'modules', 'block_qt.c'))
|
||||||
|
copy(op.join('debian', 'build_pe_modules.py'), op.join(destpath, 'build_pe_modules.py'))
|
||||||
debdest = op.join(destpath, 'debian')
|
debdest = op.join(destpath, 'debian')
|
||||||
os.makedirs(debdest)
|
os.makedirs(debdest)
|
||||||
debopts = json.load(open(op.join('debian', ed('{}.json'))))
|
debopts = json.load(open(op.join('debian', ed('{}.json'))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user