Skip to content

Commit 9e7df27

Browse files
committed
feat(debianize): Debian folder to create deb packages
Signed-off-by: Gaurav Mishra <[email protected]>
1 parent df4b068 commit 9e7df27

File tree

14 files changed

+158
-120
lines changed

14 files changed

+158
-120
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/bin/
2+
# Compiled python modules.
3+
*.pyc
4+
*__pycache__*
5+
6+
# Setuptools distribution folder.
7+
/dist/
8+
9+
# Python egg metadata, regenerated from source files by setuptools.
10+
/*.egg-info
11+
/*.egg
12+
13+
# Eclipse files
14+
*.project
15+
*.pydevproject
16+
*.settings*
17+
18+

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ exclude *.git*
77
exclude *.sh
88
exclude *imtihaan.py
99

10-
include requirements*.*
10+
include requirements.txt
1111
include *.py
12+
include LICENSE
1213

1314
prune .git
1415
prune venv

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ New License Scanner Project Which Should be Integrated with FOSSology but also W
1515
- These files will be placed to their appropriate places by the install script.
1616
### Install
1717
- `# python setup.py install`
18-
- In install folder, make the "atarashi-install.sh" executable
19-
- Run <./atarashi-install.sh>
20-
- pip install -r <pathto/requirements.txt>
18+
19+
#### To install dependencies only
20+
- `# pip install -r requirements.txt`
2121

2222

2323
## How to run
@@ -67,13 +67,18 @@ Get the help by running `atarashi -h` or `atarashi --help`
6767

6868
## Creating Debian packages
6969
- Install dependencies
70+
```sh
71+
# apt-get install python3-setuptools python3-all debhelper python-pip
7072
```
71-
# apt-get install python3-setuptools python3-all debhelper
72-
# pip install stdeb
73+
- Get the source distribution file using
74+
```sh
75+
$ python3 setup.py sdist
7376
```
74-
- Create Debian packages
77+
- Copy the archive and rename it
78+
```sh
79+
$ cp dist/atarashi-0.0.9.tar.gz ../atarashi_0.0.9.orig.tar.gz
7580
```
76-
$ python3 setup.py --command-packages=stdeb.command bdist_deb
81+
- Build the package
82+
```sh
83+
$ debuild
7784
```
78-
- Locate the files under `deb_dist`
79-

atarashi/.DS_Store

-6 KB
Binary file not shown.

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
atarashi (0.0.9-1) unstable; urgency=low
2+
3+
* Initial Atarashi release
4+
5+
-- Aman Jain <[email protected]> Thu, 09 Aug 2018 13:45:56 +0530

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

debian/control

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Source: atarashi
2+
Maintainer: Aman Jain <[email protected]>
3+
Section: python
4+
Priority: optional
5+
Build-Depends: python3-setuptools, python3-all, python-pip, debhelper (>= 7.4.3)
6+
Standards-Version: 3.9.1
7+
8+
9+
10+
11+
12+
Package: python3-atarashi
13+
Architecture: all
14+
Depends: ${misc:Depends}, python-pip
15+
Description: An intelligent license scanner.
16+
# Atarashi
17+
New License Scanner Project Which Should be Integrated with FOSSology but also Work Independently.
18+
.
19+
### Requirements
20+
- Python v3.x
21+
- pip
22+
.
23+
## Steps for Installation
24+
### Build (optional)
25+
- `$ python setup.py build`
26+
- Build will generate 3 new files in your current directory
27+
1. `data/Ngram_keywords.json`
28+
2. `licenses/<SPDX-version>.csv`
29+
3. `licenses/processedList.csv`
30+
- These files will be placed to their appropriate places by the install script.
31+
### Install
32+
- `# python setup.py install`
33+
- In install folder, make the "atarashi-install.sh" executable
34+
- Run <./atarashi-install.sh>
35+
- pip install -r <pathto/requirements.txt>
36+

debian/postinst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
# postinst script for atarashi
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
# * <postinst> `configure' <most-recently-configured-version>
10+
# * <old-postinst> `abort-upgrade' <new version>
11+
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12+
# <new-version>
13+
# * <postinst> `abort-remove'
14+
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15+
# <failed-install-package> <version> `removing'
16+
# <conflicting-package> <version>
17+
# for details, see http://www.debian.org/doc/debian-policy/ or
18+
# the debian-policy package
19+
20+
21+
case "$1" in
22+
configure)
23+
pip install -r /usr/lib/python3/dist-packages/atarashi-0.0.9.egg-info/dependency_links.txt
24+
pip install -r /usr/lib/python3/dist-packages/atarashi-0.0.9.egg-info/requires.txt
25+
;;
26+
27+
abort-upgrade|abort-remove|abort-deconfigure)
28+
;;
29+
30+
*)
31+
echo "postinst called with unknown argument \`$1'" >&2
32+
exit 1
33+
;;
34+
esac
35+
36+
# dh_installdeb will replace this with shell code automatically
37+
# generated by other debhelper scripts.
38+
39+
40+
41+
exit 0
42+
43+

debian/rules

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/make -f
2+
3+
# This file was automatically generated by stdeb 0.8.5 at
4+
# Thu, 09 Aug 2018 13:45:56 +0530
5+
6+
%:
7+
dh $@ --with python3 --buildsystem=python_distutils
8+
9+
10+
override_dh_auto_clean:
11+
python3 setup.py clean -a
12+
find . -name \*.pyc -exec rm {} \;
13+
14+
15+
16+
override_dh_auto_build:
17+
python3 setup.py build --force
18+
19+
20+
21+
override_dh_auto_install:
22+
python3 setup.py install --force --root=debian/python3-atarashi --no-compile -O0 --install-layout=deb
23+
24+
25+
26+
override_dh_python2:
27+
dh_python2 --no-guessing-versions
28+
29+
30+
31+

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

0 commit comments

Comments
 (0)