Skip to content

Commit 03b13e6

Browse files
committed
Fixed installation process with the GNU Build System
Using a custum build system is not portable and it does not have all features that required the [GNU Coding Standards][0]. In order to come as close as possible to the [GNU Coding Standards][0]. Using [autotools][1] is a good practice. There are some changes: * the python library of this package is private so it does not install under the standard python `site-package` directory but on `pkglibdir` (default: `/usr/local/lib/cyg-apt`) * to build from source it requires the `automake` package * the build process command line: Before: $ make After: $ autoreconf -i && ./configure && make * the tests suite command line: Before: $ make test After: $ make check * the installation tests suite command line: Before: $ make installtest After: $ make installcheck [0]: http://www.gnu.org/prep/standards/standards.html#Makefile-Conventions [1]: http://www.gnu.org/software/automake/manual/automake.html#Autotools-Introduction
1 parent dec2044 commit 03b13e6

37 files changed

Lines changed: 867 additions & 459 deletions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ dist
33
*.pyc
44
.*
55
*~
6-
/src/cygapt/version.py

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ python:
44
- "2.6"
55
- "2.7"
66

7-
install:
8-
- make PYTHON=python
9-
107
script:
11-
- make test PYTHON=python
8+
- autoreconf -i
9+
- ./configure
10+
- make distcheck
1211

1312
notifications:
1413
email: false

INSTALL.md

Lines changed: 334 additions & 11 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 0 additions & 91 deletions
This file was deleted.

Makefile.am

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SUBDIRS = src doc tools
2+
3+
DIST_SUBDIRS = $(SUBDIRS) \
4+
build-aux
5+
6+
dist_doc_DATA = \
7+
AUTHORS \
8+
CONTRIBUTING.md \
9+
CONVENTIONS.md \
10+
COPYING \
11+
ChangeLog \
12+
INSTALL.md \
13+
LICENSE \
14+
NEWS.md \
15+
TODO \
16+
README.md
17+
18+
ACLOCAL_AMFLAGS = -I m4
19+
20+
dist-hook:
21+
echo '$(VERSION)' > $(distdir)/version

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ News
2020

2121
- `<cachedir>/<mirror>/<arch>/setup.ini`
2222

23+
* 1.1.0 ()
24+
25+
* the python library of this package is private so it does not install under
26+
the standard python `site-package` directory but on `pkglibdir`
27+
(default: `/usr/local/lib/cyg-apt`)
28+
29+
* to build from source it requires the `automake` package
30+
31+
* the build command line: `autoreconf -i && ./configure && make`

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,32 @@ Requirements
2020
Build requirements
2121
------------------
2222

23-
* `make` 3.80+
24-
* `git` 1.7+
23+
* `make` 3.59+
24+
25+
From source:
26+
27+
* `automake` 1.9+
2528

2629

2730
Install instructions
2831
--------------------
2932

30-
Briefly the following commands should build, test and install this package.
33+
From source please run `autoreconf` first to generate all required build scripts:
34+
35+
$ autoreconf -i
36+
37+
Briefly the following commands should configure, make and install this package:
38+
39+
$ ./configure && make && make install
40+
41+
Some features can be enable by giving to `configure` the option `--enable-FEATURE[=ARG]`:
42+
43+
* If you want to install the **bash-completion** script then set the `--enable-bash-completion=DIR` option.
44+
Where `DIR` may be one of the following directories:
3145

32-
$ make
33-
$ make test
34-
$ make install
46+
- `pkg-config --variable=completionsdir bash-completion`
47+
- `${BASH_COMPLETION_DIR}`
48+
- `/etc/bash_completion.d`
3549

3650
See the [`INSTALL.md`](INSTALL.md) file for more detailed instructions.
3751

VERSION-GEN

Lines changed: 0 additions & 71 deletions
This file was deleted.

appveyor.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ environment:
33
CYG_ROOT: C:/cygwin
44
CYG_MIRROR: http://cygwin.uib.no
55
CYG_CACHE: C:/cygwin/var/cache/setup
6+
# need to set DJDIR because bash fail to read the file descriptor 0
7+
DJDIR: /
68

79
matrix:
810
-
@@ -73,23 +75,24 @@ install:
7375
- 'if not "%PYTHON_PLATFORM%" == "cygwin" powershell ./.appveyor/install.ps1'
7476
- 'if not "%PYTHON_PLATFORM%" == "cygwin" dir "C:/python*"'
7577
- 'appveyor DownloadFile http://cygwin.com/setup-%CYG_ARCH%.exe -FileName setup.exe'
76-
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P make -P python -P gnupg > NUL'
78+
- 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P make -P python -P gnupg -P automake > NUL'
7779
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
7880
- '%PYTHON% --version'
7981
- '%PYTHON% -c "import sys; print(''Python architecture: {0}''.format(''x64'' if sys.maxsize > 2**32 else ''x86''))"'
8082
- '%PYTHON% -c "import sys; print(''Python platform: {0}''.format(sys.platform));"'
8183
- 'if "2.6" == "%PYTHON_VERSION%" appveyor DownloadFile https://raw.githubusercontent.com/bewest/argparse/master/argparse.py -FileName %PYTHON_DIR%/Lib/site-packages/argparse.py'
8284

8385
build_script:
84-
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"; make PYTHON=\"$PYTHON\""'
86+
- '%CYG_ROOT%/bin/bash -lc "cd $OLDPWD; autoreconf -i"'
87+
- '%CYG_ROOT%/bin/bash -lc "cd $OLDPWD; ./configure PYTHON=$PYTHON"'
88+
- '%CYG_ROOT%/bin/bash -lc "cd $OLDPWD; make"'
8589

8690
test_script:
87-
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"; make test PYTHON=\"$PYTHON\""'
88-
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"; make install"'
89-
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\"; make installtest PYTHON=\"$PYTHON\""'
91+
- '%CYG_ROOT%/bin/bash -lc "cd $OLDPWD; make distcheck DISTCHECK_CONFIGURE_FLAGS=PYTHON=$PYTHON"'
92+
- '%CYG_ROOT%/bin/bash -lc "cd $OLDPWD; cd src; /usr/bin/python cyg-apt setup -q"'
9093
- ps: 'cp $env:CYG_ROOT/home/$env:USERNAME/.cyg-apt -destination $env:HOMEPATH'
91-
- '%PYTHON% %CYG_ROOT%/bin/cyg-apt update -qX'
92-
- '%PYTHON% %CYG_ROOT%/bin/cyg-apt ball cygwin> ball~'
94+
- '%PYTHON% src/cyg-apt update -qX'
95+
- '%PYTHON% src/cyg-apt ball cygwin> ball~'
9396
- ps: 'Get-Content ball~ | set path; cmd /c $env:CYG_ROOT/bin/cygpath -w $path> ball~'
9497
- ps: 'Get-Content ball~'
9598
- ps: 'if (-not(Get-Content ball~ | Test-Path)) { Exit 1 }'

build-aux/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EXTRA_DIST = git-version-gen

0 commit comments

Comments
 (0)